Markets
General Information
- All endpoints return data in JSON format
- All timestamps are in milliseconds (Unix epoch time)
- No authentication required for market data endpoints
- All price and quantity values are returned as strings to preserve precision
Get Server Time
GET /time
Get the current server time in milliseconds.
Parameters: None
Response:
{
"code": 200,
"errMsg": "OK",
"result": {
"serverTime": 1758005316000
}
}
Response Fields:
| Field | Type | Description |
|---|---|---|
| serverTime | LONG | Current server time in milliseconds (Unix epoch time) |
Use Cases:
- Synchronize client time with server time
- Calculate time differences for request timestamps
- Verify network latency
Get All Markets
GET /api/v1/market
Get information about all available trading markets.
Parameters: None
Response:
{
"code": 200,
"errMsg": "OK",
"result": [
{
"marketId": "1_2",
"description": "Kaia / Tether",
"baseTokenId": "1",
"quoteTokenId": "2",
"exchange": "Alphasec Testnet",
"ticker": "KAIA/USDT",
"type": "spot",
"minmov": 1,
"pricescale": 100000,
"session": "24x7",
"hasIntraday": true,
"hasEmptyBars": true,
"takerFee": "0.0003",
"makerFee": "0.0001",
"listed": true,
"logoUrls": "",
"isDefaultMakerFee": false,
"isDefaultTakerFee": false,
"createdAt": "2025-09-17T01:26:59Z",
"updatedAt": "2025-09-17T01:26:59Z"
}
]
}
Response Fields:
| Field | Type | Description |
|---|---|---|
| marketId | STRING | Market identifier (format: {baseTokenId}_{quoteTokenId}) |
| description | STRING | Market description |
| baseTokenId | STRING | ID of the base token |
| quoteTokenId | STRING | ID of the quote token |
| exchange | STRING | Exchange name |
| ticker | STRING | Market ticker (e.g., "KAIA/USDT") |
| type | STRING | Market type (e.g., "spot") |
| minmov | INTEGER | Minimum price movement in tradingview graph |
| pricescale | INTEGER | Price scale for display in tradingview graph |
| session | STRING | Trading session (e.g., "24x7") |
| hasIntraday | BOOLEAN | Whether market has intraday data in tradingview graph |
| hasEmptyBars | BOOLEAN | Whether market has empty bars in tradingview graph |
| takerFee | STRING | Fee rate for taker orders (market orders) |
| makerFee | STRING | Fee rate for maker orders (limit orders) |
| listed | BOOLEAN | Whether the market is currently active |
| logoUrls | STRING | Comma-separated logo URLs |
| isDefaultMakerFee | BOOLEAN | Whether using default maker fee |
| isDefaultTakerFee | BOOLEAN | Whether using default taker fee |
| createdAt | STRING | Creation timestamp (ISO format) |
| updatedAt | STRING | Last update timestamp (ISO format) |
Get 24hr Ticker Price Change Statistics
GET /api/v1/market/ticker
Get 24 hour rolling window price change statistics. Careful when accessing without marketId.
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| marketId | STRING | NO | Market identifier in format {baseTokenId}_{quoteTokenId} (e.g., "1_2"). If not provided, returns tickers for all markets |
Response (Single Market):
{
"code": 200,
"errMsg": "OK",
"result": [
{
"marketId": "1_2",
"baseTokenId": "1",
"quoteTokenId": "2",
"price": "2.3",
"open24h": "2.1",
"high24h": "2.5",
"low24h": "2.0",
"volume24h": "150000.5",
"quoteVolume24h": "345001.15"
}
]
}
Response (All Markets):
{
"code": 200,
"errMsg": "OK",
"result": [
{
"marketId": "1_2",
"baseTokenId": "1",
"quoteTokenId": "2",
"price": "2.3",
"open24h": "2.1",
"high24h": "2.5",
"low24h": "2.0",
"volume24h": "150000.5",
"quoteVolume24h": "345001.15"
},
{
"marketId": "3_2",
"baseTokenId": "3",
"quoteTokenId": "2",
"price": "3500.0",
"open24h": "3400.0",
"high24h": "3600.0",
"low24h": "3350.0",
"volume24h": "1200.5",
"quoteVolume24h": "4200000.0"
}
]
}
Response Fields:
| Field | Type | Description |
|---|---|---|
| marketId | STRING | Market identifier |
| baseTokenId | STRING | Base token identifier |
| quoteTokenId | STRING | Quote token identifier |
| price | STRING | Current/last traded price |
| open24h | STRING | Opening price 24 hours ago |
| high24h | STRING | Highest price in last 24 hours |
| low24h | STRING | Lowest price in last 24 hours |
| volume24h | STRING | Base token volume traded in last 24 hours |
| quoteVolume24h | STRING | Quote token volume traded in last 24 hours |
Get All Listed Tokens
GET /api/v1/market/tokens
Get information about all tokens available for trading.
Parameters: None
Response:
{
"code": 200,
"errMsg": "OK",
"result": [
{
"tokenId": "1",
"l1Address": "0x0000000000000000000000000000000000000000",
"l1Symbol": "KAIA",
"l1Name": "Kaia Token",
"l1Decimal": 18,
"l2Symbol": "KAIA",
"l2Name": "Kaia Token",
"image": "https://storage.googleapis.com/dex-images-dev/tokens/1/image_1758080220.svg"
},
{
"tokenId": "2",
"l1Address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"l1Symbol": "USDT",
"l1Name": "Tether USD",
"l1Decimal": 6,
"l2Symbol": "USDT",
"l2Name": "Tether USD",
"image": "https://storage.googleapis.com/dex-images-dev/tokens/2/image_1758080221.svg"
}
]
}
Response Fields:
| Field | Type | Description |
|---|---|---|
| tokenId | STRING | Unique identifier for the token |
| l1Address | STRING | Token contract address on Layer 1 (Ethereum) |
| l1Symbol | STRING | Token symbol on Layer 1 |
| l1Name | STRING | Full token name on Layer 1 |
| l1Decimal | INT | Number of decimals for the token on Layer 1 |
| l2Symbol | STRING | Token symbol on Layer 2 (Kaia) |
| l2Name | STRING | Full token name on Layer 2 |
| image | STRING | URL to the token's logo image |
Get Recent Trades
GET /api/v1/market/trades
Get recent trades for a specific market.
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| marketId | STRING | YES | Market identifier in format {baseTokenId}_{quoteTokenId} (e.g., "1_2") |
| limit | INT | NO | Number of trades to return. Default: 20, Max: 1000 |
Response:
{
"code": 200,
"errMsg": "OK",
"result": [
{
"tradeId": "405100010000",
"marketId": "1_2",
"price": "2.3",
"quantity": "0.7",
"buyOrderId": "0xdb9d5d086b4755fb5e49819fef783f80fb98f893",
"sellOrderId": "0x766be3ed6e3296708885405c7766c6cc880cfafa",
"createdAt": 1758005316000,
"isBuyerMaker": false
},
{
"tradeId": "405100010001",
"marketId": "1_2",
"price": "2.31",
"quantity": "1.5",
"buyOrderId": "0xab9d5d086b4755fb5e49819fef783f80fb98f894",
"sellOrderId": "0x866be3ed6e3296708885405c7766c6cc880cfafb",
"createdAt": 1758005320000,
"isBuyerMaker": true
}
]
}
Response Fields:
| Field | Type | Description |
|---|---|---|
| tradeId | STRING | Unique trade identifier |
| marketId | STRING | Market identifier (format: {baseTokenId}_{quoteTokenId}) |
| price | STRING | Execution price in quote token |
| quantity | STRING | Trade quantity in base token |
| buyOrderId | STRING | Buy order transaction hash |
| sellOrderId | STRING | Sell order transaction hash |
| createdAt | LONG | Trade execution timestamp in milliseconds (Unix epoch) |
| isBuyerMaker | BOOLEAN | True if buyer was the maker, false if taker |
Get Order Book
GET /api/v1/market/depth
Get the order book depth for a specific market.
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| marketId | STRING | YES | Market identifier in format {baseTokenId}_{quoteTokenId} (e.g., "1_2") |
| limit | INT | NO | Depth limit per side. Default: 1000, Max: 5000 |
Response:
{
"code": 200,
"errMsg": "OK",
"result": {
"bids": [
{
"price": "2.3",
"quantity": "10.5"
},
{
"price": "2.29",
"quantity": "25.0"
},
{
"price": "2.28",
"quantity": "50.0"
}
],
"asks": [
{
"price": "2.31",
"quantity": "15.0"
},
{
"price": "2.32",
"quantity": "30.0"
},
{
"price": "2.33",
"quantity": "45.5"
}
],
"updatedAt": 1758096768006,
"lastUpdatedId": 42921
}
}
Response Fields:
| Field | Type | Description |
|---|---|---|
| bids | ARRAY | Buy orders sorted by price (highest first) |
| asks | ARRAY | Sell orders sorted by price (lowest first) |
| price | STRING | Price level in quote token |
| quantity | STRING | Total quantity available at this price level |
| updatedAt | LONG | Last update timestamp in milliseconds (Unix epoch) |
| lastUpdatedId | LONG | Sequential update ID for tracking orderbook changes |
Rate Limits
- TBD
Notes
- Market IDs follow the format
{baseTokenId}_{quoteTokenId}(e.g., "1_2" where token 1 is the base and token 2 is the quote) - All prices and quantities are returned as strings to preserve decimal precision
- Timestamps are always in milliseconds (Unix epoch time)
- The ticker endpoint returns a 24-hour rolling window of statistics
- Order book depth is aggregated at each price level
- Recent trades are returned in descending order (newest first)