ICEx Trading System API (1.0.1)

Download OpenAPI specification:

ICEx API Support: support@icex.id License: Proprietary

ICEx Trading System API

The ICEx API facilitates advanced and automated trade reporting for trading exchanges and market participants.

Overview

ICEx provides a comprehensive trading infrastructure that enables:

  • Real-time trade validation and processing
  • Secure authentication with API key and signature verification
  • Comprehensive error handling and response codes

API Conventions

  • snake_case is applied on parameters naming. uppercase & snake_case are both applied for enum values.
  • For pairs naming, use the snake_case and pairs should be written in uppercase (e.g. ICEX-BTC, ICEX-ETH, ICEX-SOL, etc).
  • API_URL (Staging): https://api-staging.icex.id

Authentication

API requests must include three authentication headers:

  • X-API-Key: Your unique API key provided by ICEx
  • X-Signature: HMAC-SHA512 signature of the request body using your API secret
  • X-Timestamp: Current Unix timestamp in milliseconds

Generating Signature

To generate the HMAC-SHA512 signature, follow these steps:

  1. Create canonical JSON: Sort the request body JSON keys alphabetically to ensure consistent ordering
  2. Build payload string: Format as "METHOD|PATH|BODY|TIMESTAMP"
  3. Calculate HMAC-SHA512: Use your API secret as the key
  4. Convert to hex: Get the lowercase hexadecimal representation

Python Implementation

import hmac
import hashlib
import json

def generate_signature(method, path, raw_body, timestamp, client_secret):
    """
    Generate HMAC-SHA512 signature for ICEx API authentication
    
    Args:
        method: HTTP method (e.g., 'POST', 'GET')
        path: API endpoint path (e.g., '/v1/trades/spot')
        raw_body: Raw request body JSON string (empty string for GET/DELETE)
        timestamp: Unix timestamp in milliseconds
        client_secret: Your API secret key
    
    Returns:
        Hexadecimal signature string
    """
    # Create canonical JSON with sorted keys
    if raw_body:
        try:
            # Parse and re-sort JSON to ensure canonical ordering
            body_dict = json.loads(raw_body)
            canonical_body = json.dumps(body_dict, sort_keys=True, separators=(',', ':'))
        except json.JSONDecodeError:
            canonical_body = raw_body
    else:
        canonical_body = ""
    
    # Build payload
    payload = f"{method}|{path}|{canonical_body}|{timestamp}"
    
    # Generate HMAC-SHA512 signature
    signature = hmac.new(
        client_secret.encode("utf-8"),
        payload.encode("utf-8"),
        hashlib.sha512
    ).hexdigest()
    
    return signature

# Example usage
if __name__ == "__main__":
    # Sample request data
    method = "POST"
    path = "/v1/trades/spot"
    timestamp = 1760662221648
    client_secret = "your_api_secret_here"
    
    # Sample request body
    request_data = {
        "request_id": "5023ed3d-321b-4b84-b1b1-d29bd4f4566f",
        "message_body": {
            "trades": [
                {
                    "trade_id": "8a13fe23-3035-4015-9acf-c52823d1fc23",
                    "trade_ts_ms": 1760662221648,
                    "side": "BUY",
                    "price": "2000000",
                    "traded_qty": "2",
                    "notional": "4000000",
                    "base_asset_id": "ICEX-SOL",
                    "quote_asset_id": "IDR",
                    "notional_asset": "IDR",
                    "maker_id": "EXCHANGE-USER-001",
                    "taker_id": "EXCHANGE-USER-002",
                    "maker_fees": {
                        "platform": {"value": "4888", "asset_id": "IDR"},
                        "tax": {"value": "8400", "asset_id": "IDR"},
                        "other": {"value": "0.00", "asset_id": "IDR"},
                        "bourse": {"value": "0.00", "asset_id": "IDR"}
                    },
                    "taker_fees": {
                        "platform": {"value": "8888", "asset_id": "IDR"},
                        "tax": {"value": "0", "asset_id": "IDR"},
                        "other": {"value": "0.00", "asset_id": "IDR"},
                        "bourse": {"value": "0.00", "asset_id": "IDR"}
                    },
                    "extras": [
                        {"key": "eth_idr_rate", "value_type": "number", "value": "2000.00"}
                    ]
                }
            ]
        }
    }
    
    # Convert to canonical JSON
    raw_body = json.dumps(request_data, sort_keys=True, separators=(',', ':'))
    
    # Generate signature
    signature = generate_signature(method, path, raw_body, timestamp, client_secret)
    
    print(f"Payload: {method}|{path}|{raw_body}|{timestamp}")
    print(f"Signature: {signature}")
    
    # Headers to include in request
    headers = {
        "X-API-Key": "your_api_key_here",
        "X-Signature": signature,
        "X-Timestamp": str(timestamp)
    }

Important Notes

  • Canonical JSON: Always sort JSON keys alphabetically to ensure consistent signature generation
  • Timestamp: Use current Unix timestamp in milliseconds (must be within 5 minutes of server time)
  • Empty body: For GET/DELETE requests, use empty string for the BODY component
  • Path: Use only the path portion, no host or query parameters
  • Encoding: Use UTF-8 encoding for both payload and secret key

Trade Reporting

  • Trades must be reported with accurate timestamps and asset information
  • Each trade requires unique trade_id for idempotency
  • Base and quote assets must use ICEx asset IDs (e.g., ICEX-BTC, IDR)
  • Fees are broken down into platform, tax, and other categories

Contact Support

System Health

System health monitoring and status checks

System health check

Check the overall health of the ICEx Trading system

Responses

Response samples

Content type
application/json
{
  • "status": "healthy",
  • "service": "icex-trading-system",
  • "version": "1.0.0",
  • "timestamp": "2025-11-18T12:13:07.408512Z"
}

Asset Management

Asset list retrieval and asset information management

Get Asset List

Retrieve the list of assets registered in the ICEx system. This endpoint returns all available assets with their IDs, codes, names, and whitelist status.

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body (empty string for GET requests)
  • X-Timestamp: Current Unix timestamp in milliseconds

Use Case: Use this endpoint to fetch the complete list of assets that can be used in trade reporting. The asset IDs returned here (e.g., ICEX-SOL, BTC-1, ICEX-ETH) should be used in the base_asset_id, quote_asset_id, and fee asset_id fields when submitting trades.

Pagination: Results are paginated with default page size of 100. Use page and limit query parameters to control pagination.

Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
query Parameters
asset_id
string
Example: asset_id=ICEX-BTC

Filter by asset code (e.g., ICEX-BTC, ICEX-ETH, ICEX-SOL)

asset_code
string
Example: asset_code=BTC

Filter by asset code (e.g., BTC, ETH, SOL)

asset_name
string
Example: asset_name=Bitcoin

Filter by asset name (e.g., Bitcoin, Ethereum, Solana)

page
integer
Example: page=1

Page number for pagination (default 1)

limit
integer
Example: limit=100

Number of items per page (default 100)

header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Responses

Response samples

Content type
application/json
Example
{
  • "timestamp": 1760662221648,
  • "request_id": "7a3f8d2c-4e1b-4a93-9c2d-8f1e6b5a9d3c",
  • "code": 200,
  • "message": "SUCCESS",
  • "data": {
    }
}

Trade Reporting

Trade report submission and processing with real-time validation

Submit Trade Report

Submit trade reports to ICEx system. The API validates the request signature, timestamp, and trade data.

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body
  • X-Timestamp: Current Unix timestamp in milliseconds

Trade Validation:

  • Each trade must have a unique trade_id for idempotency
  • Asset IDs must match ICEx registered assets (e.g., ICEX-SOL, IDR)
  • Fees must be broken down into platform, tax, and other categories
  • Trades are validated and processed in real-time

Note: Trade report submission is processed asynchronously. The API will accept the payload and enqueue it for processing. You can check the processing status of a trade report via the status API or from the ICEx dashboard.

Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Request Body schema: application/json
required

Trade report payload containing one or more trades

request_id
string <uuid>

Optional request identifier sent from the client (UUID format) for tracking purposes

required
object (MessageBody)

Responses

Request samples

Content type
application/json
Example
{
  • "request_id": "5023ed3d-321b-4b84-b1b1-d29bd4f4566f",
  • "message_body": {
    }
}

Response samples

Content type
application/json
{
  • "timestamp": 1780558773688,
  • "request_id": "7e1dc4e3-4040-48c9-ba67-1ba38e23dcd3",
  • "code": 2000,
  • "message": "SUCCESS",
  • "reason": "",
  • "data": {
    }
}

Get Invalid Trades by Request ID

Retrieve invalid trade records associated with a specific request ID. This endpoint returns detailed information about trades that failed validation, including the reason for failure.

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body (empty string for GET requests)
  • X-Timestamp: Current Unix timestamp in milliseconds

Use Case: Use this endpoint to fetch invalid trades that were rejected during the trade submission process. The response includes comprehensive details about each invalid trade, including fees, timestamps, and the specific reason for rejection.

Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
path Parameters
requestId
required
string
Example: 5023ed3d-321b-4b84-b1b1-d29bd4f4566f

The unique request ID associated with the trade submission

query Parameters
limit
integer
Default: 100
Example: limit=100

Maximum number of items to return

offset
integer
Default: 0

Number of items to skip for pagination

header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Responses

Response samples

Content type
application/json
Example
{
  • "timestamp": 1772095183215,
  • "code": 2000,
  • "message": "SUCCESS",
  • "data": {
    }
}

Market Maker

Market maker CRUD operations and management

Create Market Maker

Create a new market maker profile associated with a specific user and exchange.

When you submit a trade report, it includes two user IDs:

{
  "maker_id": "EXCHANGE-USER-001",
  "taker_id": "EXCHANGE-USER-002"
}

In this example:

  • The maker_id represents the Market Maker
  • The taker_id represents the Market Taker

So, if you want to assign the Market Maker, set the user_id value to the same ID used in maker_id:

{
  "user_id": "EXCHANGE-USER-001"
}

Regarding the type (LiquidityProvider / MarketMaker)

  • LiquidityProvider: impacts the balance during reconciliation, e.g. the exchanger it self
  • MarketMaker: does not impact the balance during reconciliation, e.g. broker

Refer to the example request on the right for more details.

Note: After submit, the account status in PENDING, so you need to wait for the approval from the admin before using the account. (Also you can create market maker in dashboard)

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body
  • X-Timestamp: Current Unix timestamp in milliseconds
Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Request Body schema: application/json
required

Market maker creation payload

request_id
required
string <uuid>

Request identifier generated by the system (e.g UUID format)

user_id
required
string

User identifier associated with this market maker

name
required
string

Market maker name/desk label

type
required
string

Market maker type (LiquidityProvider / MarketMaker)

Responses

Request samples

Content type
application/json
{
  • "request_id": "550e8400-e29b-41d4-a716-446655440000",
  • "user_id": "EXCHANGE-USER-001",
  • "name": "ACME MM Desk",
  • "type": "LiquidityProvider"
}

Response samples

Content type
application/json
{
  • "timestamp": 1763381587419,
  • "request_id": "c2c5bfbb-827d-4266-bb83-de6587d432d1",
  • "code": 200,
  • "message": "SUCCESS",
  • "data": {
    }
}

List Market Makers

Retrieve a paginated list of market makers.

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body (empty string for GET requests)
  • X-Timestamp: Current Unix timestamp in milliseconds
Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
query Parameters
limit
integer
Example: limit=50
offset
integer
Example: offset=0
header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Responses

Response samples

Content type
application/json
{
  • "timestamp": 1769431991787,
  • "code": 200,
  • "message": "SUCCESS",
  • "data": {
    }
}

Get Market Maker Detail

Retrieve detailed information of a specific market maker by its identifier.

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body (empty string for GET requests)
  • X-Timestamp: Current Unix timestamp in milliseconds
Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
path Parameters
market_maker_id
required
string
Example: a33b2375-29c8-49f3-a2f1-ef5f69144965

market_maker_id Id base on your market maker created

header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Responses

Response samples

Content type
application/json
{
  • "timestamp": 1763381796480,
  • "code": 200,
  • "message": "SUCCESS",
  • "data": {
    }
}

Update Market Maker

Update the name and/or type of an existing market maker.

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body
  • X-Timestamp: Current Unix timestamp in milliseconds
Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
path Parameters
market_maker_id
required
string <uuid>
Example: a33b2375-29c8-49f3-a2f1-ef5f69144965

Market maker identifier

header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Request Body schema: application/json
required
request_id
required
string <uuid>

Request identifier generated by the system (e.g UUID format)

name
required
string

Updated market maker name

type
required
string
Enum: "LiquidityProvider" "MarketMaker"

Market maker type

Responses

Request samples

Content type
application/json
{
  • "request_id": "550e8400-e29b-41d4-a716-446655440000",
  • "name": "Market Maker test",
  • "type": "MarketMaker"
}

Response samples

Content type
application/json
{
  • "request_id": "550e8400-e29b-41d4-a716-446655440000",
  • "timestamp": 1763381796480,
  • "code": 200,
  • "message": "SUCCESS"
}

Delete Market Maker

Delete (soft-delete) an existing market maker from the system.

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body (empty string for DELETE requests)
  • X-Timestamp: Current Unix timestamp in milliseconds
Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
path Parameters
market_maker_id
required
string <uuid>
Example: a33b2375-29c8-49f3-a2f1-ef5f69144965

Market maker identifier

header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Responses

Response samples

Content type
application/json
{
  • "timestamp": 1763385044093,
  • "code": 200,
  • "message": "SUCCESS"
}

Fiat Reconcile

Get Fiat Reconcile Summary

Get Fiat Reconciliation Summary

Retrieve reconciliation summary data within a specific period.

Authentication Headers:

  • X-API-Key: Your API key
  • X-Signature: HMAC-SHA512 signature of the request body
  • X-Timestamp: Current Unix timestamp in milliseconds

Validation Rules:

  • Maximum range: 30 days
  • Maximum return: 100 transactions per call
Authorizations:
ApiKeyAuthSignatureAuthTimestampAuth
header Parameters
X-API-Key
required
string
Example: fe770d269580c40d2355f3e93a18a6cd944da78fbdecebb6

Your unique API key provided by ICEx

X-Signature
required
string
Example: 0ced7745366bd1a62384a62272d33b2e417e4bd8d1bce96566cbff5c275e7b2c

HMAC-SHA512 signature in lowercase hex format generated using the exchange's clientSecret. Payload format: "METHOD|PATH|BODY|X-Timestamp" where METHOD is the HTTP method, PATH is the request path (no host/query), BODY is the raw request body, and X-Timestamp is the same header value.

X-Timestamp
required
integer <int64>
Example: 1760662221648

Current Unix timestamp in milliseconds (must be within 5 minutes of server time)

Request Body schema: application/json
required
any (FiatReconcileSummaryRequest)

Responses

Request samples

Content type
application/json
{
  • "request_id": "c2c5bfbb-827d-4266-bb83-de6587d432d1",
  • "start_period": "2026-02-20T00:00:00Z",
  • "end_period": "2026-03-10T23:59:59Z"
}

Response samples

Content type
application/json
{
  • "request_id": "c2c5bfbb-827d-4266-bb83-de6587d432d1",
  • "timestamp": 1763385044093,
  • "message": "SUCCESS",
  • "payload": [
    ]
}

Changelog

v1.0.1 — 2026-06-04

  • Added data.status_summary field to POST /v1/trades/spot responses (200, 207, 400)
  • status_summary contains trade batch processing counts: success, late, and super_late
  • Clarified that late and super_late in status_summary represent valid accepted trades flagged for late submission — they are not rejections and are counted in reconciliation
  • invalid_trades in 207 now only lists truly rejected trades (e.g., unknown asset ID, zero amount); late/super_late are no longer listed as invalid

v1.0.0 — Initial Release

  • Spot trade report submission via POST /v1/trades/spot with HMAC-SHA512 authentication
  • Per-trade fee breakdown into platform, tax, other, and bourse categories for both maker and taker
  • Invalid trade retrieval via GET /v1/trades/spot/invalid/{requestId} with pagination support
  • Asset list retrieval via GET /v1/assets with filters (asset_id, asset_code, asset_name) and pagination
  • Market maker CRUD operations: create, list, get detail, update, and soft-delete
  • Market maker types: LiquidityProvider (impacts balance reconciliation) and MarketMaker (does not impact balance)
  • Fiat reconciliation summary via POST /v1/fiat/reconcile-summary with up to 30-day period range
  • Optional extras array on trades for arbitrary typed key-value metadata (string, number, boolean)
  • Asynchronous trade processing — submission enqueues payload; status visible from the ICEx dashboard
  • bourse fee type treated as non-deduction factor, unlike platform, tax, and other