API Overview
The CoinAll API provides comprehensive access to trading market data and essential account management functions for cryptocurrency traders and developers.
Matching Engine System
Execution Prices
CoinAll's matching system prioritizes orders based on price-time priority:
- Price advantage takes precedence - orders with better prices execute first
- Time priority determines execution when prices are equal - earlier orders execute first
Example Scenario:
- Buy order: 1 BTC @ $9,900 (entered first)
- Buy order: 2 BTC @ $10,100
- Buy order: 1.5 BTC @ $9,900 (entered last)
Execution sequence: Order 2 (price priority) → Order 1 (time priority) → Order 3
Key Rule: Orders execute at the maker's listed price, not the taker's order price.
Order Lifecycle
Orders progress through distinct statuses:
- Open: Awaiting execution
- Filled: Completed execution
- Partially Filled: Partial execution with remainder still active
- Canceled: Order removed from matching queue
- Canceling: Transitional status during cancellation
Spot Trading Price Limits
CoinAll implements FOK (Fill-or-Kill) price limits to prevent market anomalies:
- Orders exceeding 30% price deviation from current market price get automatically canceled
- Applies to both market and limit orders
Example: A 100 BTC market buy order would cancel if execution would move price >30% above current ask.
Contract Trading Price Limits
Dynamic price limits protect investors:
- First 10 minutes: ±5% from index price
- After 10 minutes: ±3% from 10-minute premium average + index price
- Maximum deviation capped at ±25% from index price
Fee Structure
Trading Fees
CoinAll uses maker-taker fee model with volume-based discounts:
- Maker fees: Lower for providing liquidity (typically 0.08-0.20%)
- Taker fees: Higher for taking liquidity (typically 0.10-0.25%)
- Volume tiers: Higher 30-day trading volume reduces fees
- Market maker program: Rebates available for liquidity providers
Deposit/Withdrawal Fees
- Deposits: Free
- Withdrawals: Network miner fees only (varies by cryptocurrency)
Server Infrastructure
- Primary servers located in Hong Kong
- Recommended to use low-latency connections to Hong Kong
Wallet Account Management
Currency List
| Currency | Name | Deposit | Withdraw | Min Withdrawal |
|----------|----------|---------|----------|----------------|
| BTC | Bitcoin | Enabled | Enabled | 0.000001 BTC |
| ETH | Ethereum | Enabled | Enabled | 0.0001 ETH |
Account Balance Query
{
"currency": "BTC",
"balance": "5.0",
"holds": "3.2",
"available": "1.8"
}
Fund Transfers
- Between wallet, trading, and sub-accounts
Requires specifying:
- Transfer amount
- Source account type
- Destination account type
Withdrawal Process
- Initiate withdrawal request
- System verifies available balance
- Transaction broadcast to blockchain
- Completion notification
Withdrawal Limits:
- Minimum amounts vary by currency
- Network fees deducted from withdrawn amount
Spot Trading API
Account Information
{
"currency": "BTC",
"balance": "2.3",
"holds": "2.0",
"available": "0.3"
}
Order Types
Limit Orders
- Specify exact price/quantity
- Remain in order book until filled/canceled
Market Orders
- Execute immediately at best available price
Require either:
- Exact quantity (
size
parameter), OR - Exact quote currency amount (
funds
parameter)
- Exact quantity (
Order Management
- Place Order: POST
/orders
- Cancel Order: DELETE
/orders/{order_id}
- Batch Cancel: Up to 50 orders simultaneously
Trade Execution
{
"trade_id": "3245601",
"price": "10.00000000",
"size": "0.01000000",
"side": "buy",
"time": "2023-01-15T12:34:56Z"
}
Market Data API
Order Book Data
{
"bids": [
["295.96", "4.39088265", 2],
["295.95", "12.12431578", 3]
],
"asks": [
["295.97", "25.23542881", 12],
["295.98", "15.12431578", 5]
]
}
Ticker Information
{
"product_id": "BTC-USDT",
"last": "333.99",
"best_ask": "333.98",
"best_bid": "333.97",
"volume_24h": "5957.11914015",
"time": "2023-01-15T12:34:56Z"
}
Historical Trades
- Returns last 2,000 trades
- Paginated with time-based cursor
- Includes trade ID, price, quantity, and side (buy/sell)
K-Line/Candlestick Data
Available timeframes:
- 1min, 5min, 15min, 1hour, 6hour, 1day, 1week
- Returns: [time, low, high, open, close, volume]
FAQ Section
General Questions
Q: What's the difference between maker and taker fees?
A: Makers (limit orders that add liquidity) pay lower fees than takers (market orders that remove liquidity).
Q: How long do withdrawals take?
A: Withdrawal times vary by cryptocurrency network conditions, typically 5-30 minutes for blockchain confirmations.
Technical Questions
Q: What's the API rate limit?
A: Public endpoints: 6 requests/second, Private endpoints: 10 requests/second per API Key.
Q: How do I handle pagination?
A: Use before
and after
parameters with the returned OK-BEFORE
/OK-AFTER
headers for sequential data access.
Trading Questions
Q: Why was my large order canceled?
A: Orders potentially moving price >30% get auto-canceled to prevent market impact (FOK protection).
Q: How are market orders executed?
A: Market orders fill immediately against existing limit orders at best available prices until fully executed.