All URIs are relative to https://rest.cryptoapis.io
Method | HTTP request | Description |
---|---|---|
get_asset_details_by_asset_id | GET /market-data/assets/assetId/{assetId} | Get Asset Details By Asset ID |
get_asset_details_by_asset_symbol | GET /market-data/assets/{assetSymbol} | Get Asset Details By Asset Symbol |
GetAssetDetailsByAssetIDR get_asset_details_by_asset_id(asset_id)
Get Asset Details By Asset ID
Through this endpoint users can obtain information on assets by assetId
. The details returned could include information on the latest rate and rate fluctuation of different periods of time - 24 hours, a week, one hour, the encoding of the logo, and more.
- Api Key Authentication (ApiKey):
import time
import cryptoapis
from cryptoapis.api import assets_api
from cryptoapis.model.convert_bitcoin_cash_address429_response import ConvertBitcoinCashAddress429Response
from cryptoapis.model.convert_bitcoin_cash_address500_response import ConvertBitcoinCashAddress500Response
from cryptoapis.model.convert_bitcoin_cash_address422_response import ConvertBitcoinCashAddress422Response
from cryptoapis.model.get_asset_details_by_asset_idr import GetAssetDetailsByAssetIDR
from cryptoapis.model.get_asset_details_by_asset_id401_response import GetAssetDetailsByAssetID401Response
from cryptoapis.model.get_asset_details_by_asset_id400_response import GetAssetDetailsByAssetID400Response
from cryptoapis.model.convert_bitcoin_cash_address402_response import ConvertBitcoinCashAddress402Response
from cryptoapis.model.convert_bitcoin_cash_address409_response import ConvertBitcoinCashAddress409Response
from cryptoapis.model.get_asset_details_by_asset_id403_response import GetAssetDetailsByAssetID403Response
from cryptoapis.model.convert_bitcoin_cash_address415_response import ConvertBitcoinCashAddress415Response
from pprint import pprint
# Defining the host is optional and defaults to https://rest.cryptoapis.io
# See configuration.py for a list of all supported configuration parameters.
configuration = cryptoapis.Configuration(
host = "https://rest.cryptoapis.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with cryptoapis.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = assets_api.AssetsApi(api_client)
asset_id = "5b1ea92e584bf50020130612" # str | Defines the unique ID of the specific asset.
context = "yourExampleString" # str | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. (optional)
# example passing only required values which don't have defaults set
try:
# Get Asset Details By Asset ID
api_response = api_instance.get_asset_details_by_asset_id(asset_id)
pprint(api_response)
except cryptoapis.ApiException as e:
print("Exception when calling AssetsApi->get_asset_details_by_asset_id: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Get Asset Details By Asset ID
api_response = api_instance.get_asset_details_by_asset_id(asset_id, context=context)
pprint(api_response)
except cryptoapis.ApiException as e:
print("Exception when calling AssetsApi->get_asset_details_by_asset_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
asset_id | str | Defines the unique ID of the specific asset. | |
context | str | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The request has been successful. | - |
400 | 400 | - |
401 | 401 | - |
402 | You have insufficient credits. Please upgrade your plan from your Dashboard or contact our team via email. | - |
403 | 403 | - |
409 | The data provided seems to be invalid. | - |
415 | The selected Media Type is unavailable. The Content-Type header should be 'application/json'. | - |
422 | Your request body for POST requests must have a structure of { data: { item: [...properties] } } | - |
429 | The request limit has been reached. There can be maximum {requests} requests per {seconds} second(s) made. Please contact our team via email if you need more or upgrade your plan. | - |
500 | An unexpected server error has occurred, we are working to fix this. Please try again later and in case it occurs again please report it to our team via email. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAssetDetailsByAssetSymbolR get_asset_details_by_asset_symbol(asset_symbol)
Get Asset Details By Asset Symbol
Through this endpoint users can obtain information on assets by asset symbol. The details returned could include information on the latest rate and rate fluctuation of different periods of time - 24 hours, a week, one hour, the encoding of the logo, and more.
- Api Key Authentication (ApiKey):
import time
import cryptoapis
from cryptoapis.api import assets_api
from cryptoapis.model.convert_bitcoin_cash_address429_response import ConvertBitcoinCashAddress429Response
from cryptoapis.model.convert_bitcoin_cash_address500_response import ConvertBitcoinCashAddress500Response
from cryptoapis.model.convert_bitcoin_cash_address422_response import ConvertBitcoinCashAddress422Response
from cryptoapis.model.get_asset_details_by_asset_symbol403_response import GetAssetDetailsByAssetSymbol403Response
from cryptoapis.model.get_asset_details_by_asset_symbol401_response import GetAssetDetailsByAssetSymbol401Response
from cryptoapis.model.convert_bitcoin_cash_address402_response import ConvertBitcoinCashAddress402Response
from cryptoapis.model.convert_bitcoin_cash_address409_response import ConvertBitcoinCashAddress409Response
from cryptoapis.model.get_asset_details_by_asset_symbol400_response import GetAssetDetailsByAssetSymbol400Response
from cryptoapis.model.get_asset_details_by_asset_symbol_r import GetAssetDetailsByAssetSymbolR
from cryptoapis.model.convert_bitcoin_cash_address415_response import ConvertBitcoinCashAddress415Response
from pprint import pprint
# Defining the host is optional and defaults to https://rest.cryptoapis.io
# See configuration.py for a list of all supported configuration parameters.
configuration = cryptoapis.Configuration(
host = "https://rest.cryptoapis.io"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with cryptoapis.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = assets_api.AssetsApi(api_client)
asset_symbol = "BTC" # str | Specifies the asset's unique symbol in the Crypto APIs listings.
context = "yourExampleString" # str | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. (optional)
# example passing only required values which don't have defaults set
try:
# Get Asset Details By Asset Symbol
api_response = api_instance.get_asset_details_by_asset_symbol(asset_symbol)
pprint(api_response)
except cryptoapis.ApiException as e:
print("Exception when calling AssetsApi->get_asset_details_by_asset_symbol: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Get Asset Details By Asset Symbol
api_response = api_instance.get_asset_details_by_asset_symbol(asset_symbol, context=context)
pprint(api_response)
except cryptoapis.ApiException as e:
print("Exception when calling AssetsApi->get_asset_details_by_asset_symbol: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
asset_symbol | str | Specifies the asset's unique symbol in the Crypto APIs listings. | |
context | str | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | The request has been successful. | - |
400 | 400 | - |
401 | 401 | - |
402 | You have insufficient credits. Please upgrade your plan from your Dashboard or contact our team via email. | - |
403 | 403 | - |
409 | The data provided seems to be invalid. | - |
415 | The selected Media Type is unavailable. The Content-Type header should be 'application/json'. | - |
422 | Your request body for POST requests must have a structure of { data: { item: [...properties] } } | - |
429 | The request limit has been reached. There can be maximum {requests} requests per {seconds} second(s) made. Please contact our team via email if you need more or upgrade your plan. | - |
500 | An unexpected server error has occurred, we are working to fix this. Please try again later and in case it occurs again please report it to our team via email. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]