Crypto.com Exchange
The AI Agent SDK offers comprehensive Exchange-related features by retrieving information about all available trading pairs and their current market data from the Crypto.com Exchange. It also supports fetching real-time market data for a specified trading instrument, providing developers with valuable insights for building trading and analytics applications.
8.1 Get all tickers
Retrieve information about all available trading pairs and their current market data from the Crypto.com Exchange.
Arguments
Example Query
"Get all tickers"
Example Code
from crypto_com_agent_client import Agent
agent = Agent.init(
llm_config={
"provider": "OpenAI",
"model": "gpt-4",
"provider-api-key": "sk-proj-example-key",
"temperature": "float-controlling-output-randomness",
},
blockchain_config={
"chainId": "chain-id",
"explorer-api-key": "your-api-key",
"private-key": "your-private-key",
"sso-wallet-url": "your-sso-wallet-url",
},
)
response = agent.interact("Get all tickers")
print(response)
8.2 Get ticker by instrument
Retrieve current market data for a specified trading instrument from the Crypto.com Exchange.
Arguments
instrument_name (str): The name of the trading instrument (e.g., "BTC_USDT").
Example Query
"What's the ticker information of <example-instrument>"
Example Code
from crypto_com_agent_client import Agent
agent = Agent.init(
llm_config={
"provider": "OpenAI",
"model": "gpt-4",
"provider-api-key": "sk-proj-example-key",
"temperature": "float-controlling-output-randomness",
},
blockchain_config={
"chainId": "chain-id",
"explorer-api-key": "your-api-key",
"private-key": "your-private-key",
"sso-wallet-url": "your-sso-wallet-url",
},
)
response = agent.interact("What's the ticker information of <example-instrument>")
print(response)
Last updated
Was this helpful?