You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All endpoints return either a JSON object or array.
All time and timestamp related fields are in milliseconds.
For GET endpoints, parameters must be sent as url parameters.
For POST endpoints, parameters must be sent in the request body, with the header Content-Type: application/x-www-form-urlencoded.
Parameters may be sent in any order.
There are two types of APIs:
a. Oapi APIs: can be used directly without signature authentication.
b. Open APIs: require apiKey and secretKey, which can be applied for at https://ace.io/.
CCXT is our authorized SDK provider and you may access the ACE API through CCXT. For more information, please visit: https://ccxt.trade
Signing API Requests
Important Note: Do not reveal your apiKey and secretKey to anyone. They are as important as your password.
To prevent the request(s) from being tampered with during the process of network transmission, secretKey signature authentication via SHA256 is required to guarantee that you are the source of the request(s).
Follow this rule to create the signature string: ACE_SIGN + secret key + parameters values.
If your secret key is xxx, combine ACE_SIGN + xxx, to get ACE_SIGNxxx.
If your parameters are apiKey=ABC#2022&timeStamp=1671089108000"eCurrencyId=1&baseCurrencyId=2,
take the values in apikey、baseCurrencyId、quoteCurrencyId、timeStamp natural alphabetic order, to get ABC#2022211671089108000.
Combine ACE_SIGNxxx + ABC#2022211671089108000, to get ACE_SIGNxxxABC#2022211671089108000
Sign the string with SHA256 to get 56c45e08e0e168e1bac13854f494f6009e17228c7da0024fea196bfcf3ba5ac0.
Place this result into the signKey parameter.
Global Response
Every Open Api has response header X-RESPONSE-TIME : {{now timestamp}}
Python Example
import requests
import time
import hashlib
# Replace with your api key
api_key = 'your api key'
# Replace with your security key
security_key = 'your security key'
request_params = {
'apiKey': api_key,
'timeStamp': int(time.time_ns() / 1000000),
'duration': 1,
'quoteCurrencyId': 1,
'baseCurrencyId': 2,
'startTime': None,
'endTime': None,
'limit': 10,
}
sign_key_string = 'ACE_SIGN'+ security_key
# Generate signKey:
# Step1: concat sorted request_params value string
sorted_keys = sorted(request_params.keys())
for key in sorted_keys:
value = request_params.get(key)
if value is not None:
sign_key_string = sign_key_string+str(value)
# Step2: encoding sign_key_string by sha256
sign_key = hashlib.sha256(sign_key_string.encode('utf-8')).hexdigest()
# Step3: add sign_key to request_params
request_params['signKey'] = sign_key
get_price = requests.post("https://ace.io/polarisex/open/v2/kline/getKline",request_params)
print(get_price.json())
Order types:
BUY = 1
SELL = 2
Currency IDs
Up to date list is in Market Pair api.
TWD 1
BTC 2
ETH 4
LTC 7
XRP 10
TRX 13
USDT 14
BNB 17
BTTC 19
USDC 57
MOCT 66
DET 70
QQQ 72
HT 74
UNIC 75
QTC 76
FTT 81
BAAS 83
OKB 84
DAI 85
ACEX 88
LINK 89
DEC 90
HWGC 93
KNC 94
COMP 95
DS 96
CRO 97
CREAM 101
YFI 102
WNXM 103
MITH 104
SGB 106
ENJ 107
ANKR 108
MANA 109
SXP 110
CHZ 111
DOT 112
CAKE 114
SHIB 115
DOGE 116
MATIC 117
WOO 119
SLP 120
AXS 121
ADA 122
QUICK 123
FTM 124
YGG 126
GALA 127
ILV 128
DYDX 129
SOL 130
SAND 131
AVAX 132
LOOKS 133
APE 135
GMT 136
GST 139
TON 141
SSV 144
BUSD 145
Oapi API - Trade Data
GET https://ace.io/polarisex/oapi/v2/list/tradePrice
Response:
Key:
<baseCurrencyName>/<quoteCurrencyName>
Value:
Name
Type
Description
base_volume
String
24hr volume
last_price
String
the newest price
quote_volume
String
24hr turnover, the unit is base on the base currency