Skip to content

Latest commit

 

History

History
112 lines (84 loc) · 6.04 KB

File metadata and controls

112 lines (84 loc) · 6.04 KB

cryptoapis.MetadataApi

All URIs are relative to https://rest.cryptoapis.io

Method HTTP request Description
list_supported_assets GET /market-data/assets/supported List Supported Assets

list_supported_assets

ListSupportedAssetsR list_supported_assets()

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".

Example

  • Api Key Authentication (ApiKey):
import time
import cryptoapis
from cryptoapis.api import metadata_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.list_supported_assets_r import ListSupportedAssetsR
from cryptoapis.model.list_supported_assets401_response import ListSupportedAssets401Response
from cryptoapis.model.list_supported_assets400_response import ListSupportedAssets400Response
from cryptoapis.model.list_supported_assets403_response import ListSupportedAssets403Response
from cryptoapis.model.convert_bitcoin_cash_address402_response import ConvertBitcoinCashAddress402Response
from cryptoapis.model.convert_bitcoin_cash_address409_response import ConvertBitcoinCashAddress409Response
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 = metadata_api.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) if omitted the server will use the default value of 50
    offset = 0 # int | The starting index of the response items, i.e. where the response should start listing the returned items. (optional) if omitted the server will use the default value of 0

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # List Supported Assets
        api_response = api_instance.list_supported_assets(context=context, asset_type=asset_type, limit=limit, offset=offset)
        pprint(api_response)
    except cryptoapis.ApiException as e:
        print("Exception when calling MetadataApi->list_supported_assets: %s\n" % e)

Parameters

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] if omitted the server will use the default value of 50
offset int The starting index of the response items, i.e. where the response should start listing the returned items. [optional] if omitted the server will use the default value of 0

Return type

ListSupportedAssetsR

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]