SERVER_URL : api.tgex.com/api/v1
Path
GET https://${SERVER_URL}}/marketApi/spotSummaryResponse Fields
| Name | Type | Description |
|---|---|---|
| result | ||
| › trading_pairs | string | Symbol. |
| › last_price | number | The last price. |
| › lowest_ask | number | Lowest ask price. |
| › highest_bid | number | Highest bid price. |
| › base_volume | number | Sum of volume for all trade in the last 24-hrs. |
| › quote_volume | number | Sum of (price * volume) for all trade in the last 24-hrs. |
| › price_change_percent_24h | number | Relative price change in percent. |
| › highest_price_24h | number | Highest price in the last 24-hrs. |
| › lowest_price_24h | number | Lowest price in the last 24-hrs. |
Response
{ "result": [ { "trading_pairs": "BTC-USDT", "last_price": "67925.133", "lowest_ask": "67084.819", "highest_bid": "67922.695", "base_volume": "146.829", "quote_volume": "9945651.13837658", "price_change_percent_24h": "0.0114", "highest_price_24h": "68316.481", "lowest_price_24h": "67925.133" } } ]}
Path
GET https://${SERVER_URL}}/marketApi/spotTickerResponse Fields
| Name | Type | Description |
|---|---|---|
| result | object | |
| › pair | object | The symbol name. |
| ›› base_volume | number | Trading volume Lowest price in the last 24-hrs. |
| ›› last_price | number | Last price. |
| ›› quote_volume | number | Sum of (price * volume) for all trade in the last 24-hrs. |
| ›› isFrozen | string | Indicates if the market is currently enabled (0) or disabled (1). |
Response
{ "result": { "BTC-USDT": { "last_price": "68060.339", "quote_volume": "10002435.59036588", "base_volume": "147.662", "isFrozen": "0" }, "ETH-USDT": { "last_price": "2495.283", "quote_volume": "15005933.41310047", "base_volume": "6002.176", "isFrozen": "0" } }}
Path
GET https://${SERVER_URL}}/marketApi/spotOrderBook?market_pair=BNB-USDT&depth=100Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| market_pair | true | string | Symbol name. |
| depth | false | string | Depth = 100 means 50 for each bid/ask side. |
Response Fields
| Name | Type | Description |
|---|---|---|
| result | object | |
| › timestamp | timestamp | The last updated timestamp in milliseconds |
| › ticker_id | string | Symbol name. |
| › bids | number | An array containing 2 elements. The offer price and quantity. |
| › asks | number | An array containing 2 elements. The offer price and quantity. |
Response
{ "result": { "timestamp": 1730099831958, "bids": [ [ "261.261", // price "0.023" // quantity ] ], "asks": [ [ "262.261", "0.123" ] ], "ticker_id": "BNB-USDT" }}
Path
GET https://${SERVER_URL}}/marketApi/perpetualContractsResponse Fields
| Name | Type | Description |
|---|---|---|
| result | Array of object | |
| › ticker_id | string | Symbol name. |
| › base_currency | string | Symbol/currency code of base pair, eg. BTC. |
| › quote_currency | string | Always USDT. |
| › last_price | number | The last price |
| › base_volume | number | Sum of volume for all trade in the last 24-hrs. |
| › quote_volume | number | Sum of (price * volume) for all trade in the last 24-hrs. |
| › bid | number | Current highest bid price. |
| › ask | number | Current lowest ask price. |
| › high | number | Highest price in the last 24-hrs. |
| › low | number | Lowest price in the last 24-hrs. |
| › product_type | string | Always Perpetual. |
| › open_interest | number | Open interest of the symbol |
| › open_interest_usd | number | Open interest in USDT Value of the symbol. |
| › index_price | number | Last calculated index price for underlying of contract. |
| › creation_timestamp | Long | Start date of derivative |
| › expiry_timestamp | Long | Ignore |
| › funding_rate | number | Current funding rate. |
| › next_funding_rate_timestamp | Long | Timestamp of the next funding rate change. |
| › contract_type | string | Always Quanto. |
| › contract_price | number | Describes the price per contract. |
| › contract_price_currency | string | Always USDT. |
| › taker_fee | number | Taker fee. |
| › maker_fee | number | Maker fee. |
Response
{ "result": [ { "ticker_id": "BTC-USDT-PERPETUAL", "base_currency": "BTC", "quote_currency": "USDT", "last_price": "72245.9", "base_volume": "8.8", "quote_volume": "629242.8082704", "bid": "72238.5", "ask": "72253.3", "high": "65636", "low": "65636", "product_type": "perpetual", "open_interest": "5.504", "open_interest_usd": "397641.4336", "index_price": "72238.4", "creation_timestamp": 1725440400000, "funding_rate": "-0.0001", "next_funding_rate_timestamp": 1730264400000, "contract_type": "Quanto", "contract_price": "72245.9", "contract_price_currency": "USDT", "maker_fee": "0.0002", "taker_fee": "0.0005", "usd_volume": "635763.92" } ]}
Path
xxxxxxxxxxGET https://${SERVER_URL}}/marketApi/perpetualOrderBook?market_pair=BNB-USDT-PERPETUAL&depth=100Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| market_pair | true | string | Symbol name. eg: "BTC-USDT-PERPETUAL" |
| depth | false | string | Depth = 100 means 50 for each bid/ask side. |
Response Fields
| Name | Type | Description |
|---|---|---|
| result | object | |
| › timestamp | timestamp | The last updated timestamp in milliseconds |
| › ticker_id | string | Symbol name. |
| › bids | number | An array containing 2 elements. The offer price and quantity. |
| › asks | number | An array containing 2 elements. The offer price and quantity. |
Response
xxxxxxxxxx{ "jsonrpc": "2.0", "usIn": 1730168126479, "usOut": 1730168126485, "usDiff": 6, "result": { "timestamp": 1730168126484, "bids": [ [ "70919.9", "0.001" ] ], "asks": [ [ "70935.3", "0.001" ] ], "ticker_id": "BTC-USDT-PERPETUAL" }}
Path
xxxxxxxxxxGET https://${SERVER_URL}}/marketApi/marketTrades?market_pair=BNB-USDT-PERPETUALParameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| market_pair | true | string | Symbol name such as “BTC-USDT”,"BTC-USDT-PERPETUAL" |
Response Fields
| Name | Type | Description |
|---|---|---|
| result | object | |
| › trade_id | integer | Trade id. |
| › price | number | Trade price. |
| › base_volume | number | Trade amount. |
| › quote_volume | number | base_volume * price. |
| › timestamp | timestamp | Trade time. |
| › type | string | Taker direction. buy or sell |
Response
xxxxxxxxxx{ "jsonrpc": "2.0", "usIn": 1730168200725, "usOut": 1730168203135, "usDiff": 2410, "result": [ { "trade_id": 922696418, "price": "70930.9", "base_volume": "0.021", "quote_volume": "1489.5489", "timestamp": 1730168200381, "type": "sell" } ]}