Welcome to the comprehensive guide for BiKi Exchange's API integration. This document provides detailed instructions on accessing market data, executing trades, and managing orders programmatically through BiKi's robust API system.
Getting Started with BiKi API
BiKi Exchange offers a powerful yet user-friendly API interface that enables developers to:
- Access real-time market data
- Execute automated trades
- Manage orders efficiently
- Monitor account balances
Creating Your API Keys
To begin using BiKi's API services:
- Register an account on BiKi Exchange
- Navigate to User Center โ API Management
- Generate your unique API Key and Secret Key combination
Security Notice:
- Each account can create up to 5 API keys
- Never share your API Key or Secret Key with anyone
- For enhanced security, bind your API keys to specific IP addresses (maximum 5 IPs per key)
API Connection Methods
BiKi supports two primary connection protocols:
1. REST API
- Best for: Account balance queries, spot trading, and order management
- Features: Market data retrieval, account information, trade execution
2. WebSocket API
- Best for: Real-time market updates
- Features: Live order books, trade feeds, and market depth information
๐ Learn more about WebSocket connections
Server Locations and Performance
BiKi's servers are located in Tokyo. For optimal performance:
- Choose servers with low latency to Tokyo
- Consider geographic proximity when selecting your hosting provider
REST API Specifications
Base URLs
Primary endpoints for REST API access:
- https://openapi.biki.com (Recommended)
- https://openapi.bikicoin.pro
Request Headers
All REST API requests must include:
Content-Type: application/x-www-form-urlencodedStatus Codes Reference
| Code | Description | Notes |
|---|---|---|
| 0 | Success | |
| 5 | Order failed | Check price/quantity precision |
| 6 | Quantity below minimum | |
| 7 | Quantity above maximum | |
| 8 | Cancel order failed | |
| 9 | Trading frozen | |
| 13 | System error | |
| 19 | Insufficient balance | |
| 22 | Order not found | |
| 23 | Missing quantity parameter | |
| 24 | Missing price parameter | |
| 10034 | Insufficient balance | |
| 10062 | Precision exceeds limit | |
| 10063 | Quantity below minimum | |
| 10064 | Price/amount below minimum | |
| 10067 | Price beyond daily limit | |
| 10068 | Order size exceeds limit | |
| 10069 | Order frequency too high | |
| 10071 | Market orders not allowed | |
| 100001 | System exception | |
| 100002 | System maintenance | |
| 100004 | Invalid parameters | |
| 100005 | Signature error | |
| 100007 | Unauthorized IP | |
| 110004 | Withdrawal frozen | |
| 110025 | Account locked | |
| 110041 | API rate limit exceeded |
Authentication Process
All private API requests require digital signature authentication:
- Sort parameters alphabetically by name
- Concatenate parameter names and values
- Append Secret Key to the concatenated string
- Generate MD5 hash (32-bit, lowercase)
- Include signature in request parameters
Example signature generation:
MD5(api_key0816016bb06417f50327e2b557d39aaatime156200607ab5bba291b8e1cabd8009c2ce6aabdb3)Resulting in:
sign = 5fcf02e226a4bb2fb180be2aaa6fe541๐ See detailed authentication examples
Complete REST API Reference
Public Endpoints (No Authentication Required)
| Endpoint | Description | Rate Limit |
|---|---|---|
GET /open/api/common/symbols | List all trading pairs | 10/sec |
GET /open/api/get_allticker | Market tickers | 10/sec |
GET /open/api/market | Latest prices | 10/sec |
GET /open/api/get_ticker | Specific pair data | 10/sec |
GET /open/api/get_trades | Trade history | 10/sec |
GET /open/api/get_records | K-line data | 10/sec |
GET /open/api/market_dept | Order book depth | 10/sec |
Private Endpoints (Require Authentication)
| Endpoint | Description | Rate Limit |
|---|---|---|
GET /open/api/user/account | Account balance | 10/sec |
GET /open/api/v2/new_order | Current orders | 10/sec |
GET /open/api/v2/all_order | All orders | 10/sec |
GET /open/api/all_trade | Trade history | 10/sec |
GET /open/api/order_info | Order details | 10/sec |
POST /open/api/create_order | Create order | 100/10sec |
POST /open/api/cancel_order | Cancel order | 100/10sec |
POST /open/api/cancel_order_all | Cancel all orders | 100/10sec |
POST /open/api/mass_replaceV2 | Batch order operations | 100/10sec |
Frequently Asked Questions
Q: How do I handle API rate limits?
A: BiKi implements strict rate limits to ensure system stability. Monitor your request frequency and implement proper throttling in your application.
Q: What's the recommended way to get real-time data?
A: For real-time updates, use WebSocket API instead of polling REST endpoints. This provides instant updates and reduces API calls.
Q: How secure are API keys?
A: API keys provide full access to your account. Always store them securely, enable IP restrictions, and rotate keys periodically.
Q: What should I do if I get an authentication error?
A: Double-check your signature generation process, timestamp synchronization, and parameter ordering. Ensure your Secret Key hasn't been compromised.
Q: Is there a sandbox/test environment?
A: Currently, BiKi doesn't offer a public sandbox environment. Test with small amounts in live trading.
Q: How do I handle decimal precision?
A: Always respect the precision values returned by the /common/symbols endpoint to avoid order rejection.