Skip to main content

Module symbol

Module symbol 

Source
Expand description

Bitget symbol converter implementation.

This module provides conversion between unified CCXT symbols and Bitget-specific exchange IDs for spot, swap (perpetual), and futures markets.

§Bitget Symbol Formats

Market TypeUnified FormatBitget FormatProduct Type
SpotBTC/USDTBTCUSDTspot
Linear SwapBTC/USDT:USDTBTCUSDTUSDT-FUTURES
Inverse SwapBTC/USD:BTCBTCUSDCOIN-FUTURES

§Example

use ccxt_exchanges::bitget::symbol::BitgetSymbolConverter;

assert_eq!(BitgetSymbolConverter::unified_to_exchange("BTC/USDT"), "BTCUSDT");
assert_eq!(BitgetSymbolConverter::unified_to_exchange("BTC/USDT:USDT"), "BTCUSDT");
assert_eq!(BitgetSymbolConverter::product_type_from_symbol("BTC/USDT:USDT"), "USDT-FUTURES");
assert_eq!(BitgetSymbolConverter::product_type_from_symbol("BTC/USDT"), "spot");

Structs§

BitgetSymbolConverter
Bitget symbol converter.