Skip to main content

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:

FieldTypeDescription
serverTimeLONGCurrent 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:

FieldTypeDescription
marketIdSTRINGMarket identifier (format: {baseTokenId}_{quoteTokenId})
descriptionSTRINGMarket description
baseTokenIdSTRINGID of the base token
quoteTokenIdSTRINGID of the quote token
exchangeSTRINGExchange name
tickerSTRINGMarket ticker (e.g., "KAIA/USDT")
typeSTRINGMarket type (e.g., "spot")
minmovINTEGERMinimum price movement in tradingview graph
pricescaleINTEGERPrice scale for display in tradingview graph
sessionSTRINGTrading session (e.g., "24x7")
hasIntradayBOOLEANWhether market has intraday data in tradingview graph
hasEmptyBarsBOOLEANWhether market has empty bars in tradingview graph
takerFeeSTRINGFee rate for taker orders (market orders)
makerFeeSTRINGFee rate for maker orders (limit orders)
listedBOOLEANWhether the market is currently active
logoUrlsSTRINGComma-separated logo URLs
isDefaultMakerFeeBOOLEANWhether using default maker fee
isDefaultTakerFeeBOOLEANWhether using default taker fee
createdAtSTRINGCreation timestamp (ISO format)
updatedAtSTRINGLast 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:

NameTypeMandatoryDescription
marketIdSTRINGNOMarket 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:

FieldTypeDescription
marketIdSTRINGMarket identifier
baseTokenIdSTRINGBase token identifier
quoteTokenIdSTRINGQuote token identifier
priceSTRINGCurrent/last traded price
open24hSTRINGOpening price 24 hours ago
high24hSTRINGHighest price in last 24 hours
low24hSTRINGLowest price in last 24 hours
volume24hSTRINGBase token volume traded in last 24 hours
quoteVolume24hSTRINGQuote 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:

FieldTypeDescription
tokenIdSTRINGUnique identifier for the token
l1AddressSTRINGToken contract address on Layer 1 (Ethereum)
l1SymbolSTRINGToken symbol on Layer 1
l1NameSTRINGFull token name on Layer 1
l1DecimalINTNumber of decimals for the token on Layer 1
l2SymbolSTRINGToken symbol on Layer 2 (Kaia)
l2NameSTRINGFull token name on Layer 2
imageSTRINGURL to the token's logo image

Get Recent Trades

GET /api/v1/market/trades

Get recent trades for a specific market.

Parameters:

NameTypeMandatoryDescription
marketIdSTRINGYESMarket identifier in format {baseTokenId}_{quoteTokenId} (e.g., "1_2")
limitINTNONumber 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:

FieldTypeDescription
tradeIdSTRINGUnique trade identifier
marketIdSTRINGMarket identifier (format: {baseTokenId}_{quoteTokenId})
priceSTRINGExecution price in quote token
quantitySTRINGTrade quantity in base token
buyOrderIdSTRINGBuy order transaction hash
sellOrderIdSTRINGSell order transaction hash
createdAtLONGTrade execution timestamp in milliseconds (Unix epoch)
isBuyerMakerBOOLEANTrue 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:

NameTypeMandatoryDescription
marketIdSTRINGYESMarket identifier in format {baseTokenId}_{quoteTokenId} (e.g., "1_2")
limitINTNODepth 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:

FieldTypeDescription
bidsARRAYBuy orders sorted by price (highest first)
asksARRAYSell orders sorted by price (lowest first)
priceSTRINGPrice level in quote token
quantitySTRINGTotal quantity available at this price level
updatedAtLONGLast update timestamp in milliseconds (Unix epoch)
lastUpdatedIdLONGSequential 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)