NAV
shell python javascript

Introduction

Welcome to the ANDX API! Using the API you can read market info, ticker info, create orders, view the status of existing orders, cancel orders, get balances etc. This documentation includes examples using cURL and python. The python examples use requests for https.

All request paths must include the trailing slash (e.g. /api/v1/ticker/ instead of /api/v1/ticker).

Rate Limits

Do not make more than 60 requests per 1 minute or you will get a rate limit error(HTTP 429). We expect you won't encounter rate limits in normal usage.

Public Endpoints

Public endpoints are used for retrieving informations about market. Since they are unauthenticated, no need to add authentication headers for requests(ACCESS-USER, ACCESS-PASSPHRASE, ACCESS-TIMESTAMP, ACCESS-SIGN, ACCESS-KEY).

List All Markets Info

import requests

requests.get('https://platform.andx.one/api/v1/market_info/')
curl "https://platform.andx.one/api/v1/market_info/"

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "markets": [
      {
        "market_code": "BTCUSDT",
        "url_symbol": "btcusdt",
        "base_currency": "BTC",
        "counter_currency": "USDT",
        "minimum_order_amount": "5.00",
        "maximum_order_amount": "10000.00",
        "base_currency_decimal": 8,
        "counter_currency_decimal": 2,
        "presentation_decimal": 2,
        "resell_market": false,
        "min_multiplier": "0.60",
        "max_multiplier": "3.00",
        "maker_fee_ratio": "0.00150000",
        "taker_fee_ratio": "0.00250000",
        "list_date": 0,
        "base_currency_name": "Bitcoin",
        "counter_currency_name": "Tether",
        "risk_group": 0,
        "trigger_order": {
          "L": true,
          "M": true
        }
      },
      {
        "market_code": "ETHUSDT",
        "url_symbol": "ethusdt",
        "base_currency": "ETH",
        "counter_currency": "USDT",
        "minimum_order_amount": "5.00",
        "maximum_order_amount": "1000000.00",
        "base_currency_decimal": 8,
        "counter_currency_decimal": 2,
        "presentation_decimal": 2,
        "resell_market": false,
        "min_multiplier": "0.60",
        "max_multiplier": "3.00",
        "maker_fee_ratio": "0.00150000",
        "taker_fee_ratio": "0.00250000",
        "list_date": 0,
        "base_currency_name": "Ethereum",
        "counter_currency_name": "Tether",
        "risk_group": 0,
        "trigger_order": {
          "L": true,
          "M": true
        }
      }
    ]
  }
}

This endpoint retrieves all available markets.

HTTP Request

GET https://platform.andx.one/api/v1/market_info/

Get a Specific Market Info

import requests

requests.get('https://platform.andx.one/api/v1/market_info/BTCUSDT/')
curl "https://platform.andx.one/api/v1/market_info/BTCUSDT/"

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "markets": {
      "market_code": "BTCUSDT",
      "url_symbol": "btcusdt",
      "base_currency": "BTC",
      "counter_currency": "USDT",
      "minimum_order_amount": "5.00",
      "maximum_order_amount": "10000.00",
      "base_currency_decimal": 8,
      "counter_currency_decimal": 2,
      "presentation_decimal": 2,
      "resell_market": false,
      "min_multiplier": "0.60",
      "max_multiplier": "3.00",
      "maker_fee_ratio": "0.00150000",
      "taker_fee_ratio": "0.00250000",
      "list_date": 0,
      "base_currency_name": "Bitcoin",
      "counter_currency_name": "Tether",
      "risk_group": 0,
      "trigger_order": {
        "L": true,
        "M": true
      }
    }
  }
}

This endpoint retrieves a specific market data.

HTTP Request

GET https://platform.andx.one/api/v1/market_info/<MARKET_CODE>/

URL Parameters

Parameter Description
MARKET_CODE Market code of the market to retrieve

List All Tickers Info

import requests

requests.get('https://platform.andx.one/api/v1/ticker/')
curl "https://platform.andx.one/api/v1/ticker/"

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "ticker": {
      "BTCUSDT": {
        "market": {
          "market_code": "BTCUSDT",
          "base_currency_code": "BTC",
          "counter_currency_code": "USDT"
        },
        "bid": "76426.55",
        "ask": "76526.46",
        "last_price": "76519.57",
        "last_size": "0.00010000",
        "volume_24h": "0.00",
        "change_24h": "0.00",
        "low_24h": "76519.57",
        "high_24h": "76519.57",
        "avg_24h": "76519.57",
        "timestamp": "1779206986.3913925"
      },
      "ETHUSDT": {
        "market": {
          "market_code": "ETHUSDT",
          "base_currency_code": "ETH",
          "counter_currency_code": "USDT"
        },
        "bid": "2115.33",
        "ask": "2117.46",
        "last_price": "2103.95",
        "last_size": "0.02531377",
        "volume_24h": "1.31",
        "change_24h": "-0.48",
        "low_24h": "2091.37",
        "high_24h": "2148.15",
        "avg_24h": "2122.15",
        "timestamp": "1779206985.910192"
      }
    }
  }
}

This endpoint retrieves ticker data for all markets

HTTP Request

GET https://platform.andx.one/api/v1/ticker/

Get a Specific Ticker Info

import requests

requests.get('https://platform.andx.one/api/v1/ticker/BTCUSDT/')
curl "https://platform.andx.one/api/v1/ticker/BTCUSDT/"

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "ticker": {
      "market": {
        "market_code": "BTCUSDT",
        "base_currency_code": "BTC",
        "counter_currency_code": "USDT"
      },
      "bid": "40683.54",
      "ask": "40700.00",
      "last_price": "40683.54",
      "last_size": "0.05630107",
      "volume_24h": "1.48920663",
      "change_24h": "1.47",
      "low_24h": "39690.37",
      "high_24h": "41000.00",
      "avg_24h": "40062.85",
      "timestamp": "1525908532.9022408"
    }
  }
}

This endpoint retrieves a specific ticker data for given market.

HTTP Request

GET https://platform.andx.one/api/v1/ticker/<MARKET_CODE>/

URL Parameters

Parameter Description
MARKET_CODE Market code of the market to retrieve

Get Order Book

import requests

requests.get('https://platform.andx.one/api/v1/order_book/BTCUSDT/')
curl "https://platform.andx.one/api/v1/order_book/BTCUSDT/"

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "market_code": "BTCUSDT",
    "ticker": {
      "market": {
        "market_code": "BTCUSDT",
        "base_currency_code": "BTC",
        "counter_currency_code": "USDT"
      },
      "bid": "76377.77",
      "ask": "76530.70",
      "last_price": "76519.57",
      "last_size": "0.00010000",
      "volume_24h": "0.00",
      "change_24h": "0.00",
      "low_24h": "76519.57",
      "high_24h": "76519.57",
      "avg_24h": "76519.57",
      "timestamp": "1779207268.6902888"
    },
    "buyers": [
      {
        "orders_total_amount": "0.89599893",
        "orders_price": "76377.77"
      },
      ...
    ],
    "sellers": [
      {
        "orders_total_amount": "0.00200000",
        "orders_price": "76530.00"
      },
      ...
    ],
    "last_transactions": [
      {
        "amount": "0.05630107",
        "price": "76519.57",
        "time": "1525897633.968654",
        "type": "B"
      },
      ...
    ],
    "timestamp": "1525937572.5233314"
  }
}

This endpoint retrieves order book for given market. Last transactions and ticker data also included in response.

HTTP Request

GET https://platform.andx.one/api/v1/order_book/<MARKET_CODE>/

URL Parameters

Parameter Description
MARKET_CODE Market code of the market to retrieve

Authentication

ANDX uses API keys to allow access to the private API calls. You can generate a new API key in your ANDX Dashboard.

ANDX expects the API key to be included in all private API requests to the server in header.

Generating an API Key

For private API calls you need to sign your request with parameters below:

After creating an API key, ANDX sends a confirmation email to your registered email address. You must verify the key by following the link in that email to activate API Key.

Creating a Request

All private API calls must contain the following headers:

Content-Type should be set as application/json.

Signing a Message

import hmac
import hashlib
import time

timestamp = str(time.time())

def sign_request(apikey, secretkey, username, pass_phrase, timestamp, body):
    if body:
        data = body.decode('utf-8')
        message = apikey + username + pass_phrase + timestamp + data
    else:
        message = apikey + username + pass_phrase + timestamp + "{}"

    signature = hmac.new(str.encode(secretkey),
                        msg=str.encode(message),
                        digestmod=hashlib.sha256).hexdigest().upper()
    return signature
import * as jsSHA from 'jssha';

const timestamp = new Date().getTime();

function sign_request (apikey, secretkey, username, pass_phrase, timestamp, body) {
  const message = apikey + username + pass_phrase + timestamp + JSON.stringify(body);
  const shaObj = new jsSHA("SHA-256", "TEXT");
  shaObj.setHMACKey(secretkey, "TEXT");
  shaObj.update(message);

  return shaObj.getHMAC("HEX").toUpperCase();
};

The ACCESS-SIGN header should be generated by using HMAC-SHA256 of api_key + username + pass_phrase + timestamp + body (where + represents string concatenation)

The timestamp value should be the same in the ACCESS-TIMESTAMP header.

The body is the request body string as JSON or "{}" if there is no request body.

Private Endpoints

Private endpoints are used for order and account management. Every private request must be signed as described in authentication section.

Get Balance

import requests

url = "https://platform.andx.one/api/v1/balance/Main/"

headers = {
    'ACCESS-USER': "your.username",
    'ACCESS-PASSPHRASE': "your.passphrase",
    'ACCESS-TIMESTAMP': "timestamp",
    'ACCESS-SIGN': "signature",
    'ACCESS-KEY': "your.apikey",
    'content-type': "application/json"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)
curl -H "cache-control: no-cache" \
     -H "ACCESS-USER: your.username" \
     -H "ACCESS-PASSPHRASE: your.passphrase" \
     -H "ACCESS-TIMESTAMP: timestamp" \
     -H "ACCESS-SIGN: signature" \
     -H "ACCESS-KEY: your.apikey" \
     -H "content-type: application/json" \
     https://platform.andx.one/api/v1/balance/Main/

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "balances": {
      "ETH": {
        "currency_code": "ETH",
        "balance": "0",
        "available_balance": "0"
      },
      "LTC": {
        "currency_code": "LTC",
        "balance": "0",
        "available_balance": "0"
      },
      "USD": {
        "currency_code": "USD",
        "balance": "0",
        "available_balance": "0"
      },
      "TRY": {
        "currency_code": "TRY",
        "balance": "0",
        "available_balance": "0"
      },
      "BTC": {
        "currency_code": "BTC",
        "balance": "0",
        "available_balance": "0"
      },
      "XRP": {
        "currency_code": "XRP",
        "balance": "0",
        "available_balance": "0"
      }
    }
  }
}

This endpoint retrieves the balance of given account. If account name is not provided, then main account's balance information will be retrieved.

HTTP Request

GET https://platform.andx.one/api/v1/balance/<ACCOUNT_NAME>/

for default account:

GET https://platform.andx.one/api/v1/balance/

URL Parameters

Parameter Description Default
ACCOUNT_NAME Name of the account to retrieve Main

Get Orders

import requests

url = "https://platform.andx.one/api/v1/orders/Main/A/BTCUSDT/"

headers = {
    'ACCESS-USER': "your.username",
    'ACCESS-PASSPHRASE': "your.passphrase",
    'ACCESS-TIMESTAMP': "timestamp",
    'ACCESS-SIGN': "signature",
    'ACCESS-KEY': "your.apikey",
    'content-type': "application/json"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)
curl -H "cache-control: no-cache" \
     -H "ACCESS-USER: your.username" \
     -H "ACCESS-PASSPHRASE: your.passphrase" \
     -H "ACCESS-TIMESTAMP: timestamp" \
     -H "ACCESS-SIGN: signature" \
     -H "ACCESS-KEY: your.apikey" \
     -H "content-type: application/json" \
     https://platform.andx.one/api/v1/orders/Main/A/BTCUSDT/

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "orders": [
      {
        "order_number": 54259,
        "account_number": 109,
        "order_type": "limit",
        "market_code": "BTCUSDT",
        "base_currency": "BTC",
        "counter_currency": "USDT",
        "channel_code": "W",
        "price": "40683.54",
        "volume": "0.01000000",
        "volume_executed": "0.01000000",
        "volume_remaining": "0.00000000",
        "buy_sell": "S",
        "status": "F",
        "add_date": "2018-05-10 11:23:22.710724+00:00",
        "total": "406.83",
        "avg_price": "40683.54",
        "client_id": 0,
        "post_only": false,
        "cancelable": false
      }
    ],
    "page_number": 1,
    "total_page_count": 1,
    "total_row_count": null,
    "has_next": false
  }
}

This endpoint retrieves the orders of given account and market. If you need to retrieve orders from all available markets on the system use second url below, otherwise use first url to retrieve orders from a spesific market.

Pagination

This API request will return paginated results. The page_number parameters can be used to control pagination. Default page number will be 1 if it is not provided. Page size is 20 for every request.

HTTP Request

GET https://platform.andx.one/api/v1/orders/<ACCOUNT_NAME>/<STATUS>/<MARKET_CODE>/<PAGE_NUMBER>/

URL Parameters

Parameter Description Required Default
ACCOUNT_NAME Name of the account to retrieve Yes -
STATUS Order status(OPEN = "O", CLOSED = "C", ALL = "A") Yes -
MARKET_CODE Market Code('BTCUSDT' e.g) Yes -
PAGE_NUMBER Page Number No 1

or to get orders from all available markets:

GET https://platform.andx.one/api/v1/orders/<ACCOUNT_NAME>/<STATUS>/<PAGE_NUMBER>/

URL Parameters

Parameter Description Required Default
ACCOUNT_NAME Name of the account to retrieve Yes -
STATUS Order status(OPEN = "O", CLOSED = "C", ALL = "A") Yes -
PAGE_NUMBER Page Number No 1

Enum in Response Properties

Parameter Description
channel_code W: Web, M: Mobile
buy_sell B: Buy, S: Sell
status O: OPEN, C: CLOSED, A: ALL

Get Order Status

import requests

url = "https://platform.andx.one/api/v1/order_status/122/"

headers = {
    'ACCESS-USER': "your.username",
    'ACCESS-PASSPHRASE': "your.passphrase",
    'ACCESS-TIMESTAMP': "timestamp",
    'ACCESS-SIGN': "signature",
    'ACCESS-KEY': "your.apikey",
    'content-type': "application/json"
    }

response = requests.request("GET", url, headers=headers)

print(response.text)
curl -H "cache-control: no-cache" \
     -H "ACCESS-USER: your.username" \
     -H "ACCESS-PASSPHRASE: your.passphrase" \
     -H "ACCESS-TIMESTAMP: timestamp" \
     -H "ACCESS-SIGN: signature" \
     -H "ACCESS-KEY: your.apikey" \
     -H "content-type: application/json" \
     https://platform.andx.one/api/v1/order_status/122/

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "order": {
      "order_number": 54259,
      "account_number": 109,
      "order_type": "limit",
      "market_code": "BTCUSDT",
      "base_currency": "BTC",
      "counter_currency": "USDT",
      "channel_code": "W",
      "price": "40683.54",
      "volume": "0.01000000",
      "volume_executed": "0.01000000",
      "volume_remaining": "0.00000000",
      "buy_sell": "S",
      "status": "F",
      "add_date": "2018-05-10 11:23:22.710724+00:00",
      "update_date": "2018-05-10 11:23:23.710724+00:00",
      "total": "406.83",
      "avg_price": "40683.54",
      "client_id": 0,
      "post_only": false,
      "cancelable": false,
      "fee_amount": "0E-16"
    }
  }
}

This endpoint retrieves the status of a given order.

HTTP Request

GET https://platform.andx.one/api/v1/order_status/<ORDER_NUMBER>/

URL Parameters

Parameter Description Required
ORDER_NUMBER Order number Yes

Enum in Response Properties

Parameter Description
channel_code W: Web, M: Mobile
buy_sell B: Buy, S: Sell
status NEW: N, PARTIALLY FILLED: P, FILLED: F, CANCELED: C, REJECTED: R

Create Order

import requests

url = "https://platform.andx.one/api/v1/orders/"

headers = {
    'ACCESS-USER': "your.username",
    'ACCESS-PASSPHRASE': "your.passphrase",
    'ACCESS-TIMESTAMP': "timestamp",
    'ACCESS-SIGN': "signature",
    'ACCESS-KEY': "your.apikey",
    'content-type': "application/json"
    }

payload = {
    'order_type': "limit",
    'market_code': "BTCUSDT",
    'volume': "10000",
    'buy_sell': "B",
    'price': "9300",
    'client_id': 0,
    'post_only': False,
    'account_name': "Main"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
curl -H "cache-control: no-cache" \
     -H "ACCESS-USER: your.username" \
     -H "ACCESS-PASSPHRASE: your.passphrase" \
     -H "ACCESS-TIMESTAMP: timestamp" \
     -H "ACCESS-SIGN: signature" \
     -H "ACCESS-KEY: your.apikey" \
     -H "content-type: application/json" \
     -X POST \
     --data '{"order_type": "limit", "market_code": "BTCUSDT", "volume": "10000", "buy_sell": "B", "price": "9300", "client_id": 0, "post_only": false, "account_name": "Main"}' \
     https://platform.andx.one/api/v1/orders/

The above command returns JSON structured like this(When order created successfully):

{
  "status": "success",
  "data": {
    "order_number": 54264
  }
}

The above command returns JSON structured like this(When an error occurred):

{
  "status": "error",
  "reason": "account_owner_different",
  "status_code": 1101,
  "data": {}
}

This endpoint allows you to create an order.

HTTP Request

POST https://platform.andx.one/api/v1/orders/

Order Properties

Parameter Type Required Description
order_type String Yes "limit" or "market"
market_code String Yes Market Code("BTCUSDT" e.g)
volume String Yes Volume ("0.01" e.g)
buy_sell String Yes "B" or "S"
price String Yes Price ("40775.44" e.g, "0" for market orders)
client_id Integer No Client Id(Default = 0)
post_only Boolean No Post Only(Default = false)
account_name String Yes Account Name

Cancel Order

import requests

url = "https://platform.andx.one/api/v1/cancel_order/122/"

headers = {
    'ACCESS-USER': "your.username",
    'ACCESS-PASSPHRASE': "your.passphrase",
    'ACCESS-TIMESTAMP': "timestamp",
    'ACCESS-SIGN': "signature",
    'ACCESS-KEY': "your.apikey",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data={}, headers=headers)

print(response.text)
curl -H "cache-control: no-cache" \
     -H "ACCESS-USER: your.username" \
     -H "ACCESS-PASSPHRASE: your.passphrase" \
     -H "ACCESS-TIMESTAMP: timestamp" \
     -H "ACCESS-SIGN: signature" \
     -H "ACCESS-KEY: your.apikey" \
     -H "content-type: application/json" \
     -X POST \
     --data '{}' \
     https://platform.andx.one/api/v1/cancel_order/122/

The above command returns JSON structured like this(When order cancelled successfully):

{
  "status": "success",
  "data": {
    "message": "order_cancel_request_submitted"
  }
}

The above command returns JSON structured like this(When an error occurred):

{
  "status": "error",
  "reason": "order_not_found",
  "status_code": 1201,
  "data": {}
}

This endpoint allows you to cancel an order.

HTTP Request

POST https://platform.andx.one/api/v1/cancel_order/<ORDER_NUMBER>/

URL Parameters

Parameter Description Required
ORDER_NUMBER Order number Yes

Create Withdraw Request

import requests

url = "https://platform.andx.one/api/v1/withdrawal/request/"

headers = {
    'ACCESS-USER': "your.username",
    'ACCESS-PASSPHRASE': "your.passphrase",
    'ACCESS-TIMESTAMP': "timestamp",
    'ACCESS-SIGN': "signature",
    'ACCESS-KEY': "your.apikey",
    'content-type': "application/json"
    }

payload = {
    'currency_code': "XRP",
    'amount': "100.25",
    'alias': "alias_name"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
curl -H "cache-control: no-cache" \
     -H "ACCESS-USER: your.username" \
     -H "ACCESS-PASSPHRASE: your.passphrase" \
     -H "ACCESS-TIMESTAMP: timestamp" \
     -H "ACCESS-SIGN: signature" \
     -H "ACCESS-KEY: your.apikey" \
     -H "content-type: application/json" \
     -X POST \
     --data '{"currency_code": "XRP", "amount": "100.25", "alias": "alias_name"}' \
     https://platform.andx.one/api/v1/withdrawal/request/

The above command returns JSON structured like this(When withdraw request created successfully):

{
  "status": "success",
  "data": {
    "message": "Your withdraw request is processing."
  }
}

The above command returns JSON structured like this(When an error occurred):

{
  "status": "error",
  "reason": "Withdraw address not found",
  "status_code": 1319,
  "data": {}
}

This endpoint allows you to create a withdraw request to your saved addresses. Make sure you have a withdraw address with the given alias.

HTTP Request

POST https://platform.andx.one/api/v1/withdrawal/request/

Order Properties

Parameter Type Required Description
currency_code String Yes Currency Code("XRP" e.g)
amount String Yes Amount ("100.25" e.g)
alias String Yes Alias

Instant Trade Authentication

Instant Trade endpoints (under /p/v1/order/...) use a different authentication scheme from the API-key signing used by the private endpoints (/api/v1/...). The two are not interchangeable: the credentials below work only on /p/v1/... endpoints, and the API keys work only on /api/v1/... endpoints.

Credentials

Instant Trade requests are signed with two values from your logged-in session on platform.andx.one:

Finding USER_NAME and TOKEN

Both values live in your browser's local storage while you are logged in:

  1. Open platform.andx.one and log in.
  2. Right-click anywhere on the page → Inspect.
  3. Open the Application tab.
  4. Under StorageLocal Storage, click https://platform.andx.one.
  5. Copy the values of the USER_NAME and TOKEN keys.

The TOKEN rotates with your browser session. When requests start returning 401 Unauthorized, fetch a fresh TOKEN from a current session and redeploy your bot.

Creating a Request

All Instant Trade requests must contain the following headers (note the lowercase header names):

Content-Type should be set as application/json.

Signing a Message

import hmac
import hashlib
import time
import json

timestamp = str(int(time.time() * 1000))

payload = {
    "buy_currency_code": "USDT",
    "sell_currency_code": "BTC",
    "sell_currency_amount": "0.00007"
}
body = json.dumps(payload)

def sign_request(token, username, timestamp, body):
    message = username + timestamp + body

    signature = hmac.new(str.encode(token),
                        msg=str.encode(message),
                        digestmod=hashlib.sha256).hexdigest().upper()
    return signature
import * as jsSHA from 'jssha';

const timestamp = new Date().getTime();

const payload = {
  "buy_currency_code": "USDT",
  "sell_currency_code": "BTC",
  "sell_currency_amount": "0.00007"
};
const body = JSON.stringify(payload);

function sign_request (token, username, timestamp, body) {
  const message = username + timestamp + body;
  const shaObj = new jsSHA("SHA-256", "TEXT");
  shaObj.setHMACKey(token, "TEXT");
  shaObj.update(message);

  return shaObj.getHMAC("HEX").toUpperCase();
};

The access-sign header is the HMAC-SHA256 of username + timestamp + body (where + represents string concatenation), keyed with your TOKEN, output as an upper-case hex string.

The timestamp value must be the same millisecond value sent in the access-timestamp header.

Instant Trade Endpoints

Every request must be signed as described in the Instant Trade Authentication section.

Get Quote

import requests
import json

url = "https://platform.andx.one/p/v1/order/get_depth_limits_and_amounts/"

payload = {
    "buy_currency_code":    "USDT",
    "sell_currency_code":   "BTC",
    "sell_currency_amount": "0.00007",
}

headers = {
    "access-user":      "your.username",
    "access-timestamp": "timestamp",
    "access-sign":      "signature",
    "content-type":     "application/json",
}

response = requests.request("POST", url, data=json.dumps(payload), headers=headers)

print(response.text)
curl -H "access-user: your.username" \
     -H "access-timestamp: timestamp" \
     -H "access-sign: signature" \
     -H "content-type: application/json" \
     -X POST \
     --data '{"buy_currency_code":"USDT","sell_currency_code":"BTC","sell_currency_amount":"0.00007"}' \
     https://platform.andx.one/p/v1/order/get_depth_limits_and_amounts/

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "sell_currency_amount": "0.00007000",
    "buy_currency_amount": "4.30",
    "sell_currency_min_depth_order_amount": "0.00006579",
    "buy_currency_min_depth_order_amount": "4.04",
    "sell_currency_max_depth_order_amount": "0.02500000",
    "buy_currency_max_depth_order_amount": "1536.58",
    "sell_currency_code": "BTC",
    "buy_currency_code": "USDT",
    "visible_price": "61463.13000000",
    "trigger_order": false,
    "trigger_status": true,
    "instant_chart": true,
    "timestamp": 1781124453.4210951
  }
}

This endpoint returns a price quote for converting an amount of one currency into another.

HTTP Request

POST https://platform.andx.one/p/v1/order/get_depth_limits_and_amounts/

Order Properties

Parameter Type Required Description
buy_currency_code String Yes Currency you want to receive ("USDT" e.g)
sell_currency_code String Yes Currency you are selling ("BTC" e.g)
sell_currency_amount String Yes Amount of sell_currency_code to sell ("0.00007" e.g)

Place Instant Order

import requests
import json

url = "https://platform.andx.one/p/v1/order/instant_order/"

payload = {
    "buy_currency_code":  "USDT",
    "sell_currency_code": "BTC",
    "sell_amount":        "0.00007",
    "buy_amount":         "4.30",
    "visible_price":      "61463.13",
    "depth_order":        True,
    "with_bonus":         False,
    "with_stake":         False,
}

headers = {
    "access-user":      "your.username",
    "access-timestamp": "timestamp",
    "access-sign":      "signature",
    "content-type":     "application/json",
}

response = requests.request("POST", url, data=json.dumps(payload), headers=headers)

print(response.text)
curl -H "access-user: your.username" \
     -H "access-timestamp: timestamp" \
     -H "access-sign: signature" \
     -H "content-type: application/json" \
     -X POST \
     --data '{"buy_currency_code":"USDT","sell_currency_code":"BTC","sell_amount":"0.00007","buy_amount":"4.30","visible_price":"61463.13","depth_order":true,"with_bonus":false,"with_stake":false}' \
     https://platform.andx.one/p/v1/order/instant_order/

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "order_number": 12345678,
    "depth_order": true
  }
}

This endpoint places an instant order and returns its order_number. To check whether the order filled or was cancelled, look the order_number up with Get Order Status (which uses the API-key authentication, not the Instant Trade TOKEN).

HTTP Request

POST https://platform.andx.one/p/v1/order/instant_order/

Order Properties

Parameter Type Required Description
buy_currency_code String Yes Currency you want to receive ("USDT" e.g)
sell_currency_code String Yes Currency you are selling ("BTC" e.g)
sell_amount String Yes Amount of sell_currency_code to sell ("0.00007" e.g)
buy_amount String Yes Amount of buy_currency_code to receive ("4.30" e.g)
visible_price String Yes Price for the conversion ("61463.13" e.g)
depth_order Boolean Yes Execute against order-book depth (use true)
with_bonus Boolean Yes Apply bonus balance (false for a standard order)
with_stake Boolean Yes Apply staked balance (false for a standard order)
account_number Integer No Account to trade from. Defaults to the account tied to your TOKEN.

Get Trade History

import requests
import json

url = "https://platform.andx.one/p/v1/order/trade_history/"

payload = {
    "filter_options": {
        "date_range":   "WEEK",
        "page_number":  1,
        "account_name": "Main",
    },
}

headers = {
    "access-user":      "your.username",
    "access-timestamp": "timestamp",
    "access-sign":      "signature",
    "content-type":     "application/json",
}

response = requests.request("POST", url, data=json.dumps(payload), headers=headers)

print(response.text)
curl -H "access-user: your.username" \
     -H "access-timestamp: timestamp" \
     -H "access-sign: signature" \
     -H "content-type: application/json" \
     -X POST \
     --data '{"filter_options":{"date_range":"WEEK","page_number":1,"account_name":"Main"}}' \
     https://platform.andx.one/p/v1/order/trade_history/

The above command returns JSON structured like this:

{
  "status": "success",
  "data": {
    "trades": [
      {
        "trade_number": 12345671,
        "transaction_number": "10000001_10000002",
        "market_code": "BTCUSDT",
        "maker_taker": "T",
        "price": "77285.7142857142857",
        "total_price": "5.41",
        "amount": "0.00007000",
        "fee": "0.00000000",
        "fee_currency_code": "USDT",
        "buy_sell": "S",
        "add_date": "2026-05-22 13:00:07.330979+00:00"
      },
      {
        "trade_number": 12345673,
        "transaction_number": "10000003_10000004",
        "market_code": "BTCUSDT",
        "maker_taker": "T",
        "price": "77857.1428571428571",
        "total_price": "5.45",
        "amount": "0.00007000",
        "fee": "0.00000000",
        "fee_currency_code": "BTC",
        "buy_sell": "B",
        "add_date": "2026-05-22 06:00:07.386301+00:00"
      }
    ],
    "page_number": 2,
    "has_next": true
  }
}

This endpoint lists your executed trades for the selected period, newest first.

Pagination

Results are paginated. Use filter_options.page_number (starting at 1) to page through results; data.has_next indicates whether another page is available.

HTTP Request

POST https://platform.andx.one/p/v1/order/trade_history/

Order Properties

Parameter Type Required Description
filter_options.date_range String Yes Time range to return. One of DAY, WEEK, or MONTH.
filter_options.page_number Integer Yes Page number (starts at 1)
filter_options.account_name String Yes Account name ("Main" e.g)

Enum in Response Properties

Parameter Description
maker_taker M: Maker, T: Taker
buy_sell B: Buy, S: Sell

Response

ANDX API returns every response as described below with HTTP status code 200

{ "status": "success", "data": { ... } }

{ "status": "error", "reason": "account_owner_different", "status_code": 1101, "data": {} }

Other Errors will be return with HTTP codes below:

HTTP Code Meaning
400 Bad Request -- This response means that server could not understand the request due to invalid syntax
401 Unauthorized -- Authentication is needed to get requested response. This is similar to 403, but in this case, authentication is possible.
403 Forbidden -- Client does not have access rights to the content so server is refusing to give proper response.
404 Not Found -- Server cannot find the requested resource.
405 Method Not Allowed -- The request method is known by the server but has been disabled and cannot be used. Double check your method type (i.e. GET, POST, PUT, DELETE)
429 Too Many Requests -- The user has sent too many requests in a given amount of time ("rate limiting").
500 Internal Server Error -- The server has encountered a situation it doesn't know how to handle.
503 Service Unavailable -- The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded.