Our ClickHouse SQL interface provides direct access to normalized market metadata through three optimized views: market_spot, market_future, and market_option. These tables enable sophisticated filtering and joins impossible via REST, empowering complex analytics workflows.
api.market_spot
Spot markets (e.g., BTC/USD)
Column
Type
Description
exchange
String
Exchange name (e.g., "binance")
market_symbol
String
Normalized symbol (e.g., "BTC-USDT")
base_asset
String
Base asset (e.g., "BTC")
quote_asset
String
Quote asset (e.g., "USDT")
exchange_specific_symbol
String
Native exchange symbol (e.g., "BTCUSDT")
Use Case Example
Find all spot markets with USDT quote pairs on Binance or Kraken:
This endpoint allows you to obtain the full list of spot markets
Authorizations
AuthorizationstringRequired
Use Basic Authentication with:
Username: Your API Key
Password: Your API Secret
Responses
200
All spot markets
application/json
get
/market/spot
200
All spot markets
Get Future Markets
get
Returns expirable future and perpetual swaps.
Authorizations
AuthorizationstringRequired
Use Basic Authentication with:
Username: Your API Key
Password: Your API Secret
Responses
200
OK
application/json
get
/market/future
200
OK
Get active Option Markets
get
Authorizations
AuthorizationstringRequired
Use Basic Authentication with:
Username: Your API Key
Password: Your API Secret
Responses
200
OK
application/json
get
/market/option/active
200
OK
Get all Option Markets
get
This endpoint returns all option markets, including both active and expired options. It is useful for retrieving a comprehensive list of all options available across exchanges.
This endpoint is limited to 10000 instruments that expired before the expired_before parameter in descending order of expiration.
Authorizations
AuthorizationstringRequired
Use Basic Authentication with:
Username: Your API Key
Password: Your API Secret
Query parameters
exchangestring · enumRequired
Filter by exchange name.
Example: 'deribit', 'delta'
Possible values:
expired_beforestring · date-timeRequired
Filter options that expired before a specific date.
Format: ISO 8601 date-time (e.g., '2023-12-31T23:59:59Z').
SELECT
exchange,
market_symbol,
underlying_asset,
contract_size
FROM api.market_future
WHERE underlying_asset = 'BTC'
AND future_type = 'PERPETUAL'
AND contract_type = 'LINEAR'
SELECT
*
FROM api.market_option
WHERE underlying_asset = 'BTC'
AND option_type = 'CALL'
AND toYear(expiration) = 2024
and toQuarter(expiration) = 3
order by expiration, strike
GET /market/spot HTTP/1.1
Host: api.koinju.io
Authorization: Basic username:password
Accept: */*