Download OpenAPI specification:
REST API for submitting cryptocurrency transactions to the ICC Platform.
This API allows external systems to submit cryptocurrency transaction data to ICC for processing and tracking.
API Key Authentication:
X-Api-Key headerX-Signature header X-Timestamp headerTo generate the HMAC-SHA512 signature, follow these steps:
import hmac
import hashlib
import json
def generate_signature(method, path, raw_body, timestamp, client_secret):
"""
Generate HMAC-SHA512 signature for ICC API authentication
Args:
method: HTTP method (e.g., 'POST', 'GET')
path: API endpoint path (e.g., '/v1/transactions/crypto')
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/transactions/crypto"
timestamp = 1763474667930
client_secret = "your_api_secret_here"
# Sample request body
request_data = {
"request_id": "3ed3502d-321b-4b84-b1b1-df45629bd46f",
"request_ts_ms": 1763474667930,
"payload_type": "transactions-crypto-v3",
"payload": {
"transactions": [
{
"tx_id": "5023ed3d-321b-4b84-b1b1-d29bd4f4566f",
"user_id": "IN001222",
"recipient_user_id": "IN001468",
"asset_code": "UNI",
"asset_name": "Uniswap",
"tx_type": "DEPOSIT",
"tx_channel": "BLOCKCHAIN",
"tx_network": "TRON",
"amount": "1",
"transfer_fee": "0",
"tx_ts_ms": 1763474667930,
"tx_status": "COMPLETED",
"tx_hash": "0x5e8d51f6eabb3d2c5d7c5f9a56a6e3b77cfa8939c57f9c3cf6c60d39e2e7f3a4",
"asset_id": "ICEX-BTC",
"wallet_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"metadata": [
{
"key": "info_boolean",
"value_type": "boolean",
"value": False
},
{
"key": "info_number",
"value_type": "number",
"value": 10000
},
{
"key": "info_string",
"value_type": "string",
"value": "info"
}
]
}
]
}
}
# 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)
}
curl --location 'https://api-staging.icc.id/v1/transactions/crypto' \
--header 'X-Api-Key: your-api-key-here' \
--header 'X-Signature: your-signature-here' \
--header 'X-Timestamp: your-timestamp-here' \
--header 'Content-Type: application/json' \
--data '{
"request_id": "3ed3502d-321b-4b84-b1b1-df45629bd46f",
"request_ts_ms": 1763474667930,
"payload_type": "transactions-crypto-v3",
"payload": {
"transactions": [
{
"tx_id": "5023ed3d-321b-4b84-b1b1-d29bd4f4566f",
"user_id": "IN001222",
"recipient_user_id": "IN001468",
"asset_code": "UNI",
"asset_name": "Uniswap",
"tx_type": "DEPOSIT",
"tx_channel": "BLOCKCHAIN",
"tx_network": "TRON",
"amount": "1",
"transfer_fee": "0",
"tx_ts_ms": 1763474667930,
"tx_status": "COMPLETED",
"tx_hash": "0x5e8d51f6eabb3d2c5d7c5f9a56a6e3b77cfa8939c57f9c3cf6c60d39e2e7f3a4",
"asset_id": "ICEX-BTC",
"wallet_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"metadata": [
{
"key": "info_boolean",
"value_type": "boolean",
"value": false
},
{
"key": "info_number",
"value_type": "number",
"value": 10000
},
{
"key": "info_string",
"value_type": "string",
"value": "info"
}
]
}
]
}
}
Submit cryptocurrency transaction data from external systems using API key authentication.
All of the following fields are required in every request:
user_id - User identifier from your systemasset_id - Asset identifier (format: SYMBOL-ID)asset_code - Asset symbol (e.g., SOL, BTC, ETH)asset_name - Full asset name (e.g., Solana, Bitcoin)tx_type - Transaction type (UPPERCASE: "DEPOSIT" or "WITHDRAWAL")tx_channel - Transaction channel (typically "BLOCKCHAIN")tx_network - Blockchain network (UPPERCASE: "SOLANA", "BITCOIN", "ETHEREUM", "BSC", etc.)amount - Transaction amount (positive number)transfer_fee - Transfer fee (can be 0)tx_ts_ms - Transaction timestamp in millisecondstx_status - Transaction status (UPPERCASE: "IN_PROGRESS", "COMPLETED", "FAILED")tx_hash - Blockchain transaction hash/signaturemetadata - Array of key-value pairs for additional informationwallet_address - Wallet addressrecipient_user_id - Recipient User identifier from your system (required if tx_channel = "INTERNAL")Casing:
tx_type → UPPERCASE ("DEPOSIT", "WITHDRAWAL")tx_status → UPPERCASE ("IN_PROGRESS", "COMPLETED", "FAILED")tx_network → UPPERCASE ("SOLANA", "BITCOIN", "ETHEREUM")asset_code → UPPERCASE ("SOL", "BTC", "ETH")Formats:
asset_id → "SYMBOL-ID" (e.g., "ICEX-SOL", "ICEX-BTC", "ICEX-ETH")tx_ts_ms → Unix timestamp in milliseconds (e.g., 1692547200000)Networks (UPPERCASE):
"SOLANA""BITCOIN""ETHEREUM""POLYGON""TRON"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 from the ICEx dashboard.
| X-Api-Key required | string Example: 42a5eef831b2df8cb4a1106c1d6e623df7424322324afe73 Exchange API key for authentication |
| X-Signature required | string Example: 4b2f8a0e6c3c1a9d5f8b2c4e7a1d3f9b0c2e4a6d8f0b1c3d5e7f9a1b2c3d4e5f 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 | string Example: 1760599371260 Unix timestamp in milliseconds used in signature payload |
| request_id required | string Unique identifier for the envelope request |
| request_ts_ms required | integer <int64> Unix timestamp in milliseconds when the envelope request is created |
| payload_type required | string Payload type identifier for this envelope |
required | Array of objects (TransactionRequest) List of cryptocurrency transactions |
Example of submitting a Bitcoin deposit transaction with the new envelope payload
{- "request_id": "5023ed3d-321b-4b84-b1b1-d29bd4f4566f",
- "request_ts_ms": 1758531415890,
- "payload_type": "transactions-crypto-v3",
- "payload": {
- "transactions": [
- {
- "tx_id": "5023ed3d-321b-4b84-b1b1-d29bd4f4566f",
- "user_id": "IN001222",
- "recipient_user_id": "IN001482",
- "asset_code": "UNI",
- "asset_name": "Uniswap",
- "tx_type": "DEPOSIT",
- "tx_channel": "BLOCKCHAIN",
- "tx_network": "TRON",
- "amount": "1",
- "transfer_fee": "0",
- "tx_ts_ms": 1763474667930,
- "tx_status": "COMPLETED",
- "tx_hash": "0x5e8d51f6eabb3d2c5d7c5f9a56a6e3b77cfa8939c57f9c3cf6c60d39e2e7f3a4",
- "asset_id": "ICEX-BTC",
- "wallet_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
- "metadata": [
- {
- "key": "info_boolean",
- "value_type": "boolean",
- "value": false
}, - {
- "key": "info_number",
- "value_type": "number",
- "value": 10000
}, - {
- "key": "info_string",
- "value_type": "string",
- "value": "info"
}
]
}
]
}
}{- "timestamp": 1760662221648,
- "request_id": "5023ed3d-321b-4b84-b1b1-d29bd4f4566f",
- "code": 200,
- "message": "SUCCESS",
- "data": { }
}tx_id as a required field in each transaction objectvalue_type field (string, number, boolean)transactions array is now nested under a payload wrapper object in the request body207 PARTIAL_SUCCESS response for mixed-result batch submissions, returning per-transaction tx_id and reason500 INTERNAL_SERVER_ERROR responsetransactions-crypto-v3 envelope payloadDEPOSIT and WITHDRAWAL transaction typesBLOCKCHAIN and INTERNAL transaction channelsuser_id, asset_id, asset_code, asset_name, tx_type, tx_channel, tx_network, amount, transfer_fee, tx_ts_ms, tx_statusrecipient_user_id field (required when tx_channel is INTERNAL)tx_hash, wallet_address fieldsX-Api-Key, X-Signature, X-Timestamp)request_id