All URIs are relative to https://rest.cryptoapis.io
| Method | HTTP request | Description |
|---|---|---|
| list_supported_assets | GET /market-data/assets/supported | List Supported Assets |
ListSupportedAssetsR list_supported_assets(context=context, asset_type=asset_type, limit=limit, offset=offset)
List Supported Assets
This endpoint will return a list of supported assets. The asset could be a cryptocurrency or FIAT assets that we support. Each asset has a unique identifier - assetId and a unique symbol in the form of a string, e.g. "BTC".
- Api Key Authentication (ApiKey):
import time
import os
import cryptoapis
from cryptoapis.models.list_supported_assets_r import ListSupportedAssetsR
from cryptoapis.rest import ApiException
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'] = os.environ["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 = cryptoapis.MetadataApi(api_client)
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)
asset_type = 'crypto' # str | Defines the type of the supported asset. This could be either \"crypto\" or \"fiat\". (optional)
limit = 50 # int | Defines how many items should be returned in the response per page basis. (optional) (default to 50)
offset = 0 # int | The starting index of the response items, i.e. where the response should start listing the returned items. (optional) (default to 0)
try:
# List Supported Assets
api_response = api_instance.list_supported_assets(context=context, asset_type=asset_type, limit=limit, offset=offset)
print("The response of MetadataApi->list_supported_assets:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling MetadataApi->list_supported_assets: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| 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] |
| asset_type | str | Defines the type of the supported asset. This could be either "crypto" or "fiat". | [optional] |
| limit | int | Defines how many items should be returned in the response per page basis. | [optional] [default to 50] |
| offset | int | The starting index of the response items, i.e. where the response should start listing the returned items. | [optional] [default to 0] |
- 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]