-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from rhettre/feature/github-actions
Update README.md
- Loading branch information
Showing
1 changed file
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,82 @@ | ||
# alphasquared-py | ||
Python Wrapper for Alphasquared | ||
# AlphaSquared Python Client | ||
|
||
This is an unofficial Python client for the AlphaSquared API. It allows users to interact with the API to retrieve asset information, strategy values, and hypothetical data for cryptocurrency trading. | ||
|
||
## Features | ||
|
||
- Easy-to-use Python wrapper for the AlphaSquared API | ||
- Supports authentication using API tokens | ||
- Implements rate limiting to comply with API usage rules | ||
- Provides methods to retrieve asset information, strategy values, and hypothetical data | ||
- Includes error handling and logging functionality | ||
|
||
## Installation | ||
|
||
Install the package using pip: | ||
|
||
```bash | ||
pip install alphasquared-py | ||
``` | ||
|
||
## Authentication | ||
|
||
To use the AlphaSquared API, you need to obtain an API token from your AlphaSquared account dashboard. Once you have your token, you can authenticate as follows: | ||
|
||
```python | ||
from alphasquared import AlphaSquared | ||
|
||
api = AlphaSquared("YOUR_API_TOKEN") | ||
``` | ||
|
||
## Usage | ||
|
||
### Retrieving Asset Information | ||
|
||
```python | ||
btc_info = api.get_asset_info("BTC") | ||
print(btc_info) | ||
``` | ||
|
||
### Getting Strategy Values | ||
|
||
```python | ||
strategy_values = api.get_strategy_values("My Custom Strat") | ||
print(strategy_values) | ||
``` | ||
|
||
### Fetching Hypothetical Data | ||
|
||
```python | ||
eth_hypotheticals = api.get_hypotheticals("ETH") | ||
print(eth_hypotheticals) | ||
``` | ||
|
||
## Error Handling | ||
|
||
The client includes built-in error handling. You can check for errors in the API responses: | ||
|
||
```python | ||
result = api.get_asset_info("INVALID_ASSET") | ||
if api.has_error(result): | ||
print("An error occurred:", result["error"]) | ||
``` | ||
|
||
## Rate Limiting | ||
|
||
The client automatically handles rate limiting to ensure compliance with the API's usage rules (6 requests per minute). | ||
|
||
## Documentation | ||
|
||
For more information about the AlphaSquared API, consult the [official API documentation](https://alphasquared.io/api-docs). | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License. See the LICENSE file for more information. | ||
|
||
## Disclaimer | ||
|
||
This project is not affiliated with, maintained, or endorsed by AlphaSquared. Use this software at your own risk. Trading cryptocurrencies carries a risk of financial loss. The developers of this software are not responsible for any financial losses or damages incurred while using this software. | ||
|
||
## Support | ||
|
||
For any issues, questions, or assistance, please open an issue on the GitHub repository or contact AlphaSquared support at [email protected]. |