Cryptocurrencies.AI API python client
How to generate api key and keyId?
Go to your profile api page: https://app.cryptocurrencies.ai/profile/api
Click on "GENERATE API KEY"
How to copy KeyId:
Go to your profile accounts page: https://app.cryptocurrencies.ai/profile/accounts
Click on copy icon -> your key token will be copied in clipboard
Reference
Some methods require 'params' dict
param = {
"strategyId": "5ded5307240b81f3012372de"
}
status = client.get_order_status(params=param)
get_order_status
Args: ('params' dict)
strategyId (str): order id
Returns:
string: order status [Waiting, Canceled]
create_order
Args:
marketType (int): 0 for spot, 1 for futures market
pair (str): currency pair with underscore, e.g. "BTC_USDT"
stopLoss (float): stop loss percent, e.g. 10.0
stopLossType (str): stop loss type [limit, market]
leverage (int): leverage [1 - 125]
entryOrder (dict):
side (str): [buy, sell]
orderType (str): [limit, market]
type (int): not using yet, just place 0
amount (float): coin amount, e.g. 0.01
exitLevels (dict array): one or more exit levels {
type (int): 1 - amount and price is in percentage, 0 - in absolute values [0, 1]
price (float): percent of profit, e.g. 15, or absolute price (depending of type)
amount (int): percent of entry, e.g. 70, or absolute amount (depending of type)
orderType (string): order type, e.g. "limit"
}
Returns:
dict: order info
cancel_order
Args: ('params' dict)
strategyId (str): order id
Returns:
string: order state
get_active_smart_orders
Args:
marketType (int): 0 for spot, 1 for futures market
Returns:
dict array: array of active smart orders
get_active_smart_orders_ids
Convenient wrapper for get_active_smart_orders which returns only smart order ids
Args:
marketType (int): 0 for spot, 1 for futures market
Returns:
string array: array of active smart orders ids
get_balances
Args:
none
Returns:
dict array: balances for all assets
example: [{'assetType': 0, 'locked': 0, 'free': 31.86915117, 'asset': {'symbol': 'USDT', 'priceUSD': 1}}]
get_futures_free_balance
Convenient wrapper for get_balances.
Args:
symbol (str): coin symbol, e.g. USDT
Returns:
float: coin balance on futures wallet
Metadata
Release files for ccai-client 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ccai-client-0.0.5.tar.gz | 5.6 kB | Without provenance | Details for ccai-client-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ccai_client-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for ccai_client-0.0.5-py3-none-any.whl |
Total release size: 27.8 kB
Release files / ccai-client-0.0.5.tar.gz
| Download URL | ccai-client-0.0.5.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4c38fdc07aa9112a1aa5e61b43827f930f4e25d2c1f4fa8c7c77537be6b9d35
|
|
BLAKE2b-256 checksum How to use checksums |
29ac6f6cc146ea83cc47595fd8d575a327c785343d2014a2fc1d9e83f499cd8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Release files / ccai_client-0.0.5-py3-none-any.whl
| Download URL | ccai_client-0.0.5-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
265118e6bfab6c6c6460bfe721040465480343a1ed7ecc879a9f1ab935245e56
|
|
BLAKE2b-256 checksum How to use checksums |
9fae82a4efd749dab0a1add61c2cc0e1a459c8db8f22806b4b04a0a140d1fd0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Security for ccai-client 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.