Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for /api/v1/dex/trade/symbols and support for updated /api/v1/candle/symbols (v0.18.0) #56

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

martinkersner
Copy link
Member

@martinkersner martinkersner commented Sep 2, 2024

Updates

Symbol-related endpoints are now less restrictive and return more information in a unified format between CEX and DEX.

Response Format

Symbols are returned as list of dictionaries with following fields:

  • "b" specifies the base symbol
  • "c" specifies the chain
  • "e" specifies the exchange
  • "id" specifies the unique id
  • "m" specifies the market
  • "q" specifies the quote symbol
  • "s" specifies the api symbol

Example

{
    "c": null,
    "e": "bybit",
    "b": "ETH",
    "q": "USDT",
    "s": "ETH-USDT",
    "m": "spot",
    "id": null
}

Usage

from datamaxi import Datamaxi
api_key = "YOUR_API_KEY"
maxi = Datamaxi(api_key=api_key)

/api/v1/candle/symbols

Fetch symbols across all supported markets, exchanges and chains

maxi.candle.symbols()

Fetch only symbols from spot exchanges

maxi.candle.symbols(market="spot")

Fetch only symbols from Binance exchange (returns both supported spot and futures symbols)

maxi.candle.symbols(exchange="binance")

Fetch only exchange associated with Kaia Mainnet (for now applies to DEXes only)

maxi.candle.symbols(chain="kaia_mainnet")

Fetch symbols supported by futures market on Binance

maxi.candle.symbols(exchange="binance", market="futures')

/api/v1/dex/trade/symbols

Fetch symbols across all DEXes

maxi.dex_trade.symbols()

Fetch supported DEX symbols by Dragonswap

maxi.dex_trade.symbols(exchange="dragonswap")

Fetch supported DEX symbols on Kaia Mainnet

maxi.dex_trade.symbols(chain="kaia_mainnet")

@martinkersner martinkersner self-assigned this Sep 2, 2024
Copy link
Contributor

@hayotbisonai hayotbisonai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@martinkersner martinkersner merged commit cdfbdde into main Sep 2, 2024
7 checks passed
@martinkersner martinkersner deleted the i-1006/feat/dex-symbols branch September 2, 2024 07:26
@martinkersner martinkersner changed the title Support for /api/v1/dex/trade/symbols and support for updated /api/v1/candle/symbols Support for /api/v1/dex/trade/symbols and support for updated /api/v1/candle/symbols (v0.18.0) Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants