Skip to main content

KalqiX API (1.0.1)

Download OpenAPI specification:Download

Introduction

Welcome to the first ZK-powered exchange with unmatched security, lightning-fast transactions, and complete control of your assets.

Quick-Start Guide for the KalqiX API – authenticate, market data, orders, account & portfolio, and user info.

Authentication:

  • Use API key with HMAC signatures and wallet signing
  • Visit Kalqix Settings > API Keys dashboard to create your first API keys
  • Use API key, signature and timestamp headers to get access / validate credentials
  • Learn how to generate API signature: API Signature Guide

Base URLs:

  • Testnet: https://testnet-api.kalqix.com/v1
  • Production: coming soon

Required Headers for Private Endpoints:

  • x-api-key
  • x-api-signature
  • x-api-timestamp

Authentication

Use API key with HMAC signatures and wallet signing.

Dashboard: Visit Kalqix Settings > API Keys dashboard to create your first API keys

Use this guide to know how to generate api signature Link

Create API keys

Endpoint to create additional API keys for authentication.

Visit Kalqix Settings > API Keys dashboard to manage your keys.

Use path /v1/api-keys to generate x-api-key header

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "api_key": "string",
  • "api_secret": "string",
  • "user": "string",
  • "status": "string"
}

Markets

Endpoints for market data — markets list, order book, trades.

List all markets

List all markets

query Parameters
page
integer >= 0
Default: 0

Page number for pagination (starts from 0)

page_size
integer [ 1 .. 25 ]
Default: 20

Number of items per page (max: 25)

Responses

Request samples

from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython() as kalqix_api_python:

    res = kalqix_api_python.markets.two(page=0, page_size=20)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "total": 0,
  • "page": 0,
  • "page_size": 0,
  • "data": [
    ]
}

Market details by ticker

Get Market details by ticker

path Parameters
ticker
required
string
Default: "BTC_USDC"

Market symbol (e.g. “BTC_USDC”)

Responses

Request samples

from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython() as kalqix_api_python:

    res = kalqix_api_python.markets.three(ticker="BTC_USDC")

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "ticker": "string",
  • "market_id": 0,
  • "name": "string",
  • "base_asset": "string",
  • "quote_asset": "string",
  • "base_asset_id": 0,
  • "quote_asset_id": 0,
  • "base_asset_decimals": "string",
  • "quote_asset_decimals": "string",
  • "tick_size": "string",
  • "step_size": "string",
  • "min_price": "string",
  • "min_quantity": "string",
  • "min_trade_size": "string",
  • "market_order_margin_percent": 0,
  • "max_price_deviation_percent": 0,
  • "maker_fee": "string",
  • "taker_fee": "string",
  • "status": "string",
  • "description": "string",
  • "twenty_four_hour": {
    },
  • "price_precision": 0,
  • "quantity_precision": 0
}

Order-book depth for a market

Get Market orders depth by ticker

path Parameters
ticker
required
string
Default: "BTC_USDC"

Market symbol (e.g. “BTC_USDC”)

query Parameters
tickSize
required
string
Default: "0.01"
Enum: "0.01" "0.1" "1" "10" "50" "100"

Depth tick size for grouping order book levels

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython() as kalqix_api_python:

    res = kalqix_api_python.markets.four(ticker="BTC_USDC", tick_size=kalqix_xcazp_kalqix_api_python.TickSize.ZERO_DOT_01)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "BUY": [
    ],
  • "SELL": [
    ]
}

Recent trades for a market

Get Market trades by ticker

path Parameters
ticker
required
string
Default: "BTC_USDC"

Market symbol (e.g. “BTC_USDC”)

query Parameters
page
integer >= 0
Default: 0

Page number for pagination (starts from 0)

page_size
integer [ 1 .. 25 ]
Default: 20

Number of items per page (max: 25)

Responses

Request samples

from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython() as kalqix_api_python:

    res = kalqix_api_python.markets.five(ticker="BTC_USDC", page=0, page_size=20)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "total": 0,
  • "page": 0,
  • "page_size": 0,
  • "data": [
    ]
}

Orders

Endpoints for placing, listing, cancelling orders.

Place a new order

Place a new order by signing message with your web3 wallet

Check out complete order placement guide

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
Request Body schema: application/json
required
ticker
required
string

Market ticker in which to place the order.

price
string

Price at which to place the order (required for LIMIT orders).

quantity
required
string

Quantity (base asset) to order.

quote_quantity
string

Quantity in quote asset to order. MARKET orders using quote_quantity specifies the amount the user wants to spend (when buying)

side
required
string
Enum: "BUY" "SELL"

Whether this is a buy order or sell order.

order_type
required
string
Enum: "LIMIT" "MARKET"

Type of order: limit or market.

time_in_force
number
Enum: 0 1 2

Good Till Cancel(0), Immediate-Or-Cancel(1), Fill-Or-Kill(2)

expires_at
number

Epoch timestamp in milliseconds when an order becomes invalid and is automatically canceled

signature
required
string

Wallet signature of canonicalized JSON payload with sorted keys. Payload must include action: 'PLACE_ORDER' and timestamp fields.

timestamp
required
number

Current time as Unix timestamp in milliseconds. Must be within 5 minutes of server time for replay protection.

Responses

Request samples

Content type
application/json
{
  • "ticker": "string",
  • "price": "string",
  • "quantity": "string",
  • "quote_quantity": "string",
  • "side": "BUY",
  • "order_type": "LIMIT",
  • "time_in_force": 0,
  • "expires_at": 0,
  • "signature": "string",
  • "timestamp": 0
}

Response samples

Content type
application/json
{
  • "order_id": "string"
}

List current user's orders

Get current user orders

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
query Parameters
page
integer >= 0
Default: 0

Page number for pagination (starts from 0)

page_size
integer [ 1 .. 25 ]
Default: 20

Number of items per page (max: 25)

ticker
string

Market symbol (e.g. “BTC_USDC”)

open
string

Use value true to fetch open orders.

side
string
Enum: "BUY" "SELL"

Filter orders by side.

order_type
string
Enum: "LIMIT" "MARKET"

Filter orders by order type.

status
string
Enum: "PENDING" "PARTIALLY_FILLED" "FILLED" "CANCELLATION_REQUESTED" "CANCELLED" "EXPIRED" "EXPIRED_IN_MATCH" "FAILED"

Filter orders by status.

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.orders.seventeen(page=0, page_size=20)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "total": 0,
  • "page": 0,
  • "page_size": 0,
  • "data": [
    ]
}

Get order details/status

Get order details by id

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
path Parameters
id
required
string

Order ID

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.orders.seven(id="<id>")

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "market": "string",
  • "ticker": "string",
  • "order_id": "string",
  • "asset_id": "string",
  • "price": "string",
  • "quantity": "string",
  • "remaining_quantity": "string",
  • "side": "string",
  • "order_type": "string",
  • "timestamp": "string",
  • "signature": "string",
  • "wallet_address": "string",
  • "status": "string",
  • "base_asset": "string",
  • "quote_asset": "string",
  • "token": "string",
  • "trades": [
    ]
}

Cancel an order

Cancel a single order by ID. Requires wallet signature of canonicalized JSON payload with sorted keys.

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
path Parameters
id
required
string

Order ID

query Parameters
signature
required
string

Wallet signature of canonicalized JSON: { action: 'CANCEL_ORDER', order_id, timestamp } with sorted keys

timestamp
required
number

Current time as Unix timestamp in milliseconds. Must be within 5 minutes of server time.

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.orders.eight(id="<id>", signature="<value>", timestamp=9804.98)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "message": "Your cancellation request is received."
}

Cancel all orders for a market

Cancel all open orders for selected market. Requires wallet signature of canonicalized JSON payload with sorted keys.

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
query Parameters
market
required
number

Market ID from GET /markets endpoint

signature
required
string

Wallet signature of canonicalized JSON: { action: 'CANCEL_ALL_ORDERS', market, timestamp } with sorted keys

timestamp
required
number

Current time as Unix timestamp in milliseconds. Must be within 5 minutes of server time.

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.orders.nine(market=0, signature="<value>", timestamp=8384.84)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "message": "Your request to cancel all open orders is received.",
  • "request_id": "694248bb394d0876ba7eb4c0"
}

Account & Portfolio

Endpoints to view balances, positions, and withdrawals.

Get portfolio / balances

Get portfolio details

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.account_and_portfolio.ten()

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "assets_count": "string",
  • "total_value_usd": "string",
  • "updated_at": "string"
}

Get all positions

Get positions status

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
query Parameters
page
integer >= 0
Default: 0

Page number for pagination (starts from 0)

page_size
integer [ 1 .. 25 ]
Default: 20

Number of items per page (max: 25)

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.account_and_portfolio.eleven(page=0, page_size=20)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "total": 0,
  • "page": 0,
  • "page_size": 0,
  • "data": [
    ]
}

Get position for a specific asset

Get position detail by asset

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
path Parameters
asset
required
string
Default: "USDC"

Asset symbol (e.g. “ETH”, ”USDC”)

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.account_and_portfolio.twelve(asset="USDC")

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "name": "string",
  • "symbol": "string",
  • "total": "string",
  • "asset_id": 0,
  • "asset": "string",
  • "available": "string",
  • "locked": "string",
  • "decimals": 0,
  • "display_decimals": 0,
  • "available_formatted": "string",
  • "locked_formatted": "string"
}

Withdrawals

Endpoints to withdraw funds to external blockchain addresses.

Step 1: Initiate withdrawal

Withdrawal is a 3 step process. First step is initiate the withdrawal. Provide details about which asset you want to withdraw. Sign a canonicalized JSON payload with sorted keys including action: 'WITHDRAW' and timestamp.

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
Request Body schema: application/json
required
asset
required
string

Asset symbol (e.g., 'USDC', 'BTC')

amount
required
string

Amount to withdraw in formatted decimals

chain_id
required
number

Blockchain chain ID (e.g., 1 for Ethereum mainnet)

signature
required
string

Wallet signature of canonicalized JSON: { action: 'WITHDRAW', asset, amount, chain_id, timestamp } with sorted keys

timestamp
required
number

Current time as Unix timestamp in milliseconds. Must be within 5 minutes of server time.

Responses

Request samples

Content type
application/json
{
  • "asset": "USDC",
  • "amount": "100.0",
  • "chain_id": 1,
  • "signature": "0x...",
  • "timestamp": 1767225600000
}

Response samples

Content type
application/json
{
  • "withdrawal_id": "string"
}

Step 2: Get withdrawal proof

Withdrawal is a 3 step process. Second step is to check withdrawal proof status. Poll this endpoint until proof_ready is true.

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
path Parameters
id
required
string

withdrawal id

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.withdrawals.eighteen(id="<id>")

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "proof_ready": true,
  • "amount": "string",
  • "amount_formatted": "string",
  • "local_exit_proof": "string",
  • "global_exit_proof": "string",
  • "global_claim_index": "string",
  • "token_address": "string",
  • "chain_id": 0,
  • "network": "string",
  • "destination_network_id": 0,
  • "destination_address": "string",
  • "bridge_contract_address": "string"
}

Transfers

Endpoints to transfer assets.

Initiate transfer

Transfer asset to another wallet address. Sign a canonicalized JSON payload with sorted keys including action: 'TRANSFER' and timestamp.

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
Request Body schema: application/json
required
asset
required
string

Asset symbol (e.g., 'USDC', 'ETH')

amount
required
string

Amount to transfer in formatted decimals (e.g., '100.5' for ETH). Note: Changed from base units in v1.4.0.

to_wallet_address
required
string

Destination wallet address (required)

signature
required
string

Wallet signature of canonicalized JSON: { action: 'TRANSFER', asset, amount, to_wallet_address, timestamp } with sorted keys

timestamp
required
number

Current time as Unix timestamp in milliseconds. Must be within 5 minutes of server time.

Responses

Request samples

Content type
application/json
{
  • "asset": "USDC",
  • "amount": "100.0",
  • "to_wallet_address": "string",
  • "signature": "0x...",
  • "timestamp": 1767225600000
}

Response samples

Content type
application/json
{
  • "transfer_id": "string",
  • "from_wallet_address": "string",
  • "to_wallet_address": "string",
  • "amount": "string",
  • "amount_formatted": "string",
  • "timestamp": 1764547200,
  • "asset_id": 0,
  • "asset": "string",
  • "status": "PENDING",
  • "message": "string",
  • "signature": "string"
}

List of Transfers

Get current user transfers

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
query Parameters
page
integer >= 0
Default: 0

Page number for pagination (starts from 0)

page_size
integer [ 1 .. 25 ]
Default: 20

Number of items per page (max: 25)

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.transfers.twenty(page=0, page_size=20)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "total": 0,
  • "page": 0,
  • "page_size": 0,
  • "data": [
    ]
}

Get transfer details/status

Get transfer details by transfer_id

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
path Parameters
transfer_id
required
string

Use transfer_id

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.transfers.twenty_one(transfer_id="<id>")

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "transfer_id": "string",
  • "from_wallet_address": "string",
  • "to_wallet_address": "string",
  • "amount": "string",
  • "amount_formatted": "string",
  • "timestamp": 1764547200,
  • "asset_id": 0,
  • "asset": "string",
  • "status": "PENDING",
  • "message": "string",
  • "signature": "string"
}

User & Transaction Info

Endpoints for user profile, trade history, transaction history.

Get current user profile

Get user profile details

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.user_and_transaction_info.fourteen()

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "_id": "string",
  • "created_at": "string",
  • "wallet_address": "string",
  • "pendingDeposits": 0,
  • "active": true
}

Get transactions for a user

Get transactions (e.g.,: deposits, withdrawals) for a user

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
query Parameters
page
integer >= 0
Default: 0

Page number for pagination (starts from 0)

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.user_and_transaction_info.fifteen(page=0)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "total": 0,
  • "page": 0,
  • "page_size": 0,
  • "data": [
    ]
}

Get trade history for a user

Get trade history for a user

Authorizations:
(ApiKeyAuthHmacAuthTimestampHeader)
query Parameters
ticker
required
string
Default: "BTC_USDC"

Market symbol (e.g. “BTC_USDC”)

page
integer >= 0
Default: 0

Page number for pagination (starts from 0)

page_size
integer [ 1 .. 25 ]
Default: 20

Number of items per page (max: 25)

Responses

Request samples

import kalqix_xcazp_kalqix_api_python
from kalqix_xcazp_kalqix_api_python import KalqixAPIPython


with KalqixAPIPython(
    security=kalqix_xcazp_kalqix_api_python.Security(
        api_key_auth="<YOUR_API_KEY_HERE>",
        hmac_auth="<YOUR_API_KEY_HERE>",
        timestamp_header="<YOUR_API_KEY_HERE>",
    ),
) as kalqix_api_python:

    res = kalqix_api_python.user_and_transaction_info.sixteen(ticker="BTC_USDC", page=0, page_size=20)

    # Handle response
    print(res)

Response samples

Content type
application/json
{
  • "total": 0,
  • "page": 0,
  • "page_size": 0,
  • "data": [
    ]
}