NAV

Rest API for ACEX

Introduction

This document details the use of ACEX’s REST API for spot exchange. Our REST API is organized into publicly accessible endpoints (market data), and private authenticated endpoints (trading, funding) which require requests to be signed.

API Key Setup

Contact Us

General API Information

HTTP Return Status

Error Codes and Messages

Sample Payload below:

{
  "status": 302,
  "message": "Invalid pair symbol."
}

General Information on Endpoints

GET API Endpoints

POST API Endpoints

Buy order

POST /api/v1/order/create/buy-order
curl --location --request POST 'https://api.acex.market/v1/order/create/buy-order' 

 
--body parames  {
"api_key": "your api_key",
"secret_key": "your api secret_key",
"from_currency_price": "1.00000000",
"to_currency_price": "3.00000000",
"total": "3.00000000",
"order": "limit",
"pair": "BTC/USDT",
"type": "buy"

}

Response:


{
  "status": "200",
  "message": "buy order placed successfully",
  "details":{
  "orderId": "QnEwVit3b2ZjVW1WNVUyL2lHOHdIUT09",
  "pair": "BTC/USDT",
  "orderDate": "timestamp",
  "orderStatus": "active",
  }
}

Place in a new buy order.

Body Parameters:

Name Type Mandatory Description
api_key STRING YES
secret_key STRING YES
from_currency_price DECIMAL YES
to_currency_price DECIMAL YES
total DECIMAL YES multiply of from & to currency(1.0*3.0)
order STRING YES limit or stoporder
pair STRING YES
type STRING YES buy

Additional mandatory parameters based on type:

Type Additional mandatory parameters
limit from_currency_price, to_currency_price,total
stoporder from_currency_price, to_currency_price,total

Sell order

POST /api/v1/order/create/sell-order
curl --location --request POST 'https://api.acex.market/v1/order/create/sell-order'

    
--body parames  {
"api_key": "your api_key",
"secret_key": "your api secret_key",
"from_currency_price": "1.00000000",
"to_currency_price": "3.00000000",
"total": "3.00000000",
"order": "limit",
"pair": "BTC/USDT",
"type": "sell"

}

Response:


{
  "status": "200",
  "message": "sell order placed  successfully",
  "details":{
  "orderId": "QnEwVit3b2ZjVW1WNVUyL2lHOHdIUT09",
  "pair": "BTC/USDT",
  "orderDate": "timestamp",
  "orderStatus": "active",
  }
}

Place in a new sell order.

Body Parameters:

Name Type Mandatory Description
api_key STRING YES
secret_key STRING YES
from_currency_price DECIMAL YES
to_currency_price DECIMAL YES
total DECIMAL YES multiply of from & to currency(1.0*3.0)
order STRING YES limit or stoporder
pair STRING YES
type STRING YES sell

Additional mandatory parameters based on type:

Type Additional mandatory parameters
limit from_currency_price, to_currency_price,total
stoporder from_currency_price, to_currency_price,total


Current open orders

POST /api/v1/order/open-orders
curl --location --request POST 'https://api.acex.market/v1/order/open-orders'

 
--body parames  {
"api_key": "your api_key",
"secret_key": "your api secret_key",
"pair": "BTC/USDT",
}

Response:


{
  "status": "200",
  "message": "Success",
  "active_orders":[
  {
  "pair": "BTC/USDT",
  "datetime": "timestamp",
  "type": "Buy",
  "from_currency_price": "1.00000000",
  "to_currency_price": "1.00000000",
  "total": "1.00000000",
  "orderid": "MWhtUlM0SEpMOE5VV2wrakY5VmFudz09",
  },
  {
  "pair": "BTC/USDT",
  "datetime": "timestamp",
  "type": "Sell",
  "from_currency_price": "2.00000000",
  "to_currency_price": "1.00000000",
  "total": "1.00000000",
  "orderid": "QnEwVit3b2ZjVW1WNVUyL2lHOHdIUT09",
  },...etc,
}

Get all open orders on a symbol.

Body Parameters:

Name Type Mandatory
api_key STRING YES
secret_key STRING YES
pair STRING YES


Cancel order

POST /api/v1/order/cancel
curl --location --request POST 'https://api.acex.market/v1/order/cancel' 



--body parames  {
"api_key": "your api_key",
"secret_key": "your api secret_key",
"tradeid": "Q3lsQzJ4eUJ2ZmRrcisvL0pLL2xuZz09",

}

Response:


{
  "status": "200",
  "message": "Order cancelled successfully",
  "details":{
  "orderId": "QnEwVit3b2ZjVW1WNVUyL2lHOHdIUT09",
  "pair": "BTC/USDT",
  "type": "Buy",
  "status": "cancelled",
   "date": "timestamp",
  }
}

Cancel order for given orderId.

Body Parameters:

Name Type Mandatory
api_key STRING YES
secret_key STRING YES
tradeid STRING YES


My Trades History

POST /api/v1/order/my-history
curl --location --request POST 'https://api.acex.market/v1/order/my-history' 


--body parames  {
"api_key": "your api_key",
"secret_key": "your api secret_key",
"pair": "BTC/USDT",
}

Response:


{
  "status": "200",
  "message": "Success",
  "my_history":[
  {
  "pair": "BTC/USDT",
  "datetime": "timestamp",
  "type": "Buy",
  "from_currency_price": "1.00000000",
  "to_currency_price": "1.00000000",
  "total": "1.00000000",
  "status": "Cancelled",
  },
  {
  "pair": "BTC/USDT",
  "datetime": "timestamp",
  "type": "Sell",
  "from_currency_price": "2.00000000",
  "to_currency_price": "1.00000000",
  "total": "1.00000000",
  "status": "Filled",
  },...etc,
}

Get trades for a specific pair.

Body Parameters:

Name Type Mandatory
api_key STRING YES
secret_key STRING YES
pair STRING YES

Account Endpoints

Fund details

GET /v1/user
curl --location --request POST 'https://api.acex.market/v1/user/funds'

 
--body parames  {
    "api_key": "your api_key",
    "secret_key": "your api secret_key",
    }

Response:


{
  "status": "200",
    "message": "Success",
  "asset":[

  {
    "asset": "btc",
    "balance": "2.00123452",
  },

    
  {
    "asset": "bnb",
    "balance": "10.00123452",
  },.....etc

  
]
}

Get fund details for current account.

Body Parameters:

Name Type Mandatory
api_key String Yes
secret_key String YES