NAV

Introduction

Welcome to the developer API documentation.

Authentication

The header Authorization must include authentication JWT from AWS Cognito to access any admin endpoints.

Account User

List Users

Response Example (200)

{
  "items": [
    {
      "uid": "a12565e5-567b-432a-93b2-6349653010d9",
      "status": "CONFIRMED",
      "active": true,
      "emailVerified": true,
      "email": "johndoe@gmail.com",
      "firstName": "John",
      "lastName": "Doe",
      "createdAt": "2022-10-01T15:32:39.511",
      "updatedAt": "2022-10-01T15:32:52.248Z"
    }
  ]
}

API Invoke Function

AdminUserExpressJSv1

HTTP Request

GET /v1/admin/account/user/list

HTTP Response

Content-Type

application/json

Get User Overview

Response Example (200)

{
  "id": "152a925f-bb73-4adf-bb45-e073b9e5820a",
  "status": "CONFIRMED",
  "active": true,
  "emailVerified": true,
  "email": "janedoe@example.com",
  "firstName": "jane",
  "lastName": "doe",
  "createdAt": "2022-11-11T15:22:13.905Z",
  "updatedAt": "2022-11-11T15:24:02.328Z",
  "UserSubscription": {
    "stripeCustomerId": "cus_MmYKZgS50gQgsm",
    "updatedAt": "2022-11-11T15:33:09.494Z",
    "SubscriptionType": {
      "id": "a505df50-67bf-458b-805e-893b664a2d4c",
      "name": "PROFESSIONAL",
      "maxApiKey": 20,
      "maxBalanceUSD": 15000,
      "private": false,
      "stripePriceId": "price_1M2yg4Do02xBK2h5WLRRmZlR",
      "updatedAt": "2022-11-11T14:57:56.907Z"
    }
  }
}

API Invoke Function

AdminUserExpressJSv1

HTTP Request

GET /v1/admin/account/user/overview/<USER_ID>

HTTP Response

Content-Type

application/json

Get Exchange Total Balance

Response Example (200)

{
  "USD": 12345.12
}

API Invoke Function

AdminUserExpressJSv1

HTTP Request

GET /v1/admin/account/user/exchange/balance/<USER_ID>

HTTP Response

Content-Type

application/json

List Strategy Automated History

API Invoke Function

AdminUserExpressJSv1

HTTP Request

GET /v1/admin/account/user/trade/strategy/<USER_ID>/history

Request Query

Parameter Type Default Required Description
start String - No Start datetime of the strategy history. eg. 2022-06-01
limit Integer 30 No Last range of the interval limit. By default, it will list last 30 days in desc order. (Max: 1000)
nextToken String - No Next pagination by token.

HTTP Response

Content-Type

application/json

List Manual Trading History

API Invoke Function

AdminUserExpressJSv1

HTTP Request

GET /v1/admin/account/user/trade/manual/<USER_ID>/history

Request Query

Parameter Type Default Required Description
start String - No Start datetime of the trading history. eg. 2022-06-01
limit Integer 30 No Last range of the interval limit. By default, it will list last 30 days in desc order. (Max: 1000)
nextToken String - No Next pagination by token.

HTTP Response

Content-Type

application/json

Get Strategy Performance

API Invoke Function

AdminUserExpressJSv1

HTTP Request

GET /v1/admin/account/user/trade/strategy/<USER_ID>/performance

Request Query

Parameter Type Default Required Description
start String - No Start datetime of the strategy performance. eg. 2022-06-01

HTTP Response

Content-Type

application/json

Get Manual Trade Performance

API Invoke Function

AdminUserExpressJSv1

HTTP Request

GET /v1/admin/account/user/trade/manual/<USER_ID>/performance

Request Query

Parameter Type Default Required Description
start String - No Start datetime of the manual trade performance. eg. 2022-06-01

HTTP Response

Content-Type

application/json

Account Action

Enable User

API Invoke Function

AdminUserExpressJSv1

HTTP Request

PUT /v1/admin/account/user/action/enable/<USER_ID>

HTTP Response

Content-Type

application/json

Disable User

API Invoke Function

AdminUserExpressJSv1

HTTP Request

PUT /v1/admin/account/user/action/disable/<USER_ID>

HTTP Response

Content-Type

application/json

Reset MFA

API Invoke Function

AdminUserExpressJSv1

HTTP Request

PUT /v1/admin/account/user/action/reset/mfa/<USER_ID>

HTTP Response

Content-Type

application/json

API Invoke Function

AdminUserExpressJSv1

HTTP Request

PUT /v1/admin/account/user/action/reset/telegram/<USER_ID>

HTTP Response

Content-Type

application/json

Account Exchange

List Exchange Keys

Response Example (200)

{
  "items": [
    {
      "id": "46a19fb1-4e90-4736-b820-257c947fd694",
      "exchangeId": "BINANCE",
      "tradeType": "FUTURES",
      "strategyType": "AUTOMATED",
      "active": true,
      "name": "Default",
      "apiKeyStatus": "AUTHORIZED",
      "apiKey": "t32hMggmL26nkyFPoPkqWe5U7vMRpu3y2wdWCz4CWFHd3dq7W9xyxHoZ73CsqHZhZ",
      "createdAt": "2022-09-09T01:57:36.304Z",
      "updatedAt": "2022-09-09T01:57:36.304Z"
    },
    {
      "id": "c8a716b6-b6e6-4e16-b364-1b3647198d64",
      "exchangeId": "BINANCE",
      "tradeType": "FUTURES",
      "strategyType": "MANUAL",
      "active": true,
      "name": "My strategy test account",
      "apiKeyStatus": "AUTHORIZED",
      "apiKey": "91QNhDuErgHajrzLnfWaJ9phe7UevjtD9JGGGG06VtfB7dRu13j0KrtLBKVJgsM5D",
      "createdAt": "2022-09-09T01:57:36.304Z",
      "updatedAt": "2022-09-09T02:01:34.123Z"
    }
  ]
}

API Invoke Function

AdminUserExpressJSv1

HTTP Request

GET /v1/admin/account/user/exchange/key/<USER_ID>/list

Request Query

Parameter Type Required Description
tradeType String No Filter the items by tradeType. [SPOT, FUTURES]

HTTP Response

Content-Type

application/json

Parameter Type Description
id String API_KEY_ID.
exchangeId String Exchange ID. [BINANCE]
tradeType String API Key trade type. [SPOT, FUTURES]
strategyType String API Key type. [AUTOMATED, MANUAL]
active Boolean Exchange API key active. Will be false if apiKeyStatus is UNAUTHORIZED.
name String User defined name of the API key.
apiKey String Exchange API key.
apiKeyStatus String API Key last access status. [AUTHORIZED, UNAUTHORIZED, FAILED]
createdAt String Exchange key created datetime.
updatedAt String Exchange key data last updated datetime.

Exchange Key

List Exchange Key Balance History

Response Example (200)

{
  "items": [
    {
      "date": "2022-09-13",
      "totalUSD": 12345
    },
    {
      "date": "2022-09-12",
      "totalUSD": 12345
    },
    {
      "date": "2022-09-11",
      "totalUSD": 12340
    },
    ...
  ],
  "nextToken": null
}

API Invoke Function

AdminExchangeExpressJSv1

HTTP Request

GET /v1/admin/exchange/key/balance/history/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to list the balance history.

Request Query

Parameter Type Default Required Description
start String - No Start datetime of the balance history. eg. 2022-06-01
limit Integer 100 No Last range of the interval limit. By default, it will list last 100 days in desc order. (Max: 1000)
nextToken String - No Next pagination by token.

HTTP Response

Content-Type

application/json

Parameter Type Description
date String Date of the balance was captured.
totalUSD Float The total balance of the exchange API key is converted to USD.

Get Exchange Key Balance

This endpoint retrieves all available asset balances of the exchange API key.

Response Example (200)

{
  "BNB": {
    "free": 0,
    "used": 0,
    "total": 0
  },
  "USDT": {
    "free": 2637.5428719,
    "used": 0,
    "total": 2637.5428719
  },
  ...
}

Response Example (403)

{
  "message": "exchange API authorization failed"
}

API Invoke Function

AdminExchangeExpressJSv1

HTTP Request

GET /v1/admin/exchange/key/balance/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to check the total balance.

HTTP Response

Content-Type

application/json

Parameter Type Description
free Float Available balance can be used to place a new order.
used Float Used balance put on hold for other orders.
total Float Total balance amount of the asset unit.

Get Strategy Follow

This endpoint retrieves automated strategy follower id.

Request Example

{
  "symbol": "BTC/USDT"
}

Response Example (200)

{
  "id": "464f7da5-51cb-42e5-9e27-5f20e6abdea9",
  "active": true,
  "createdAt": "2022-11-10T18:37:26.322Z",
  "updatedAt": "2022-11-10T18:53:06.897Z"
}

API Invoke Function

AdminExchangeExpressJSv1

HTTP Request

GET /v1/admin/exchange/key/strategy/follower/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to get the strategy follower.

Request Query

Content-Type

application/json

Parameter Type Required Description
symbol String Yes Exchange symbol. eg. BTC/USDT

HTTP Response

Content-Type

application/json

Exchange Order

List Futures Open Positions

Response Example (200)

[
  {
    "symbol": "BTC/USDT",
    "contracts": 0.673,
    "contractSize": 1,
    "unrealizedPnl": -64.58874774,
    "leverage": 2,
    "collateral": 12988.8327,
    "notional": 12924.24395225,
    "markPrice": 19203.92860662,
    "entryPrice": 19299.9,
    "timestamp": 1666375929485,
    "initialMargin": 6462.12197612,
    "initialMarginPercentage": 0.5,
    "maintenanceMargin": 129.2424395225,
    "maintenanceMarginPercentage": 0.01,
    "marginRatio": 0.01,
    "datetime": "2022-10-21T18:12:09.485Z",
    "marginMode": "cross",
    "marginType": "cross",
    "side": "long",
    "hedged": false,
    "percentage": -0.99
  }
]

API Invoke Function

AdminExchangeExpressJSv1

HTTP Request

GET /v1/admin/exchange/position/<API_KEY_ID>/list

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to get the open positions.

Request Query

Parameter Type Required Description
symbol String No Exchange symbol. eg. BTC/USDT

HTTP Response

Content-Type

application/json

List Open Orders

Response Example (200)

[
  {
    "id": "3240579952",
    "clientOrderId": "x-xcKtGhcu730bcc0697b34a84bff541",
    "timestamp": 1666375930768,
    "datetime": "2022-10-21T18:12:10.768Z",
    "symbol": "BTC/USDT",
    "type": "stop_market",
    "timeInForce": "GTE_GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "stopPrice": 19000,
    "cost": 0,
    "filled": 0,
    "status": "open",
    "trades": [],
    "fees": []
  },
  {
    "id": "3240579951",
    "clientOrderId": "x-xcKtGhcu473aae399bf545f3a21c9c",
    "timestamp": 1666375930655,
    "datetime": "2022-10-21T18:12:10.655Z",
    "symbol": "BTC/USDT",
    "type": "take_profit",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": 19450,
    "stopPrice": 19450,
    "amount": 0.224,
    "cost": 0,
    "filled": 0,
    "remaining": 0.224,
    "status": "open",
    "trades": [],
    "fees": []
  }
]

API Invoke Function

AdminExchangeExpressJSv1

HTTP Request

GET /v1/admin/exchange/order/<API_KEY_ID>/list

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to get the open orders.

Request Query

Parameter Type Required Description
symbol String Yes Exchange symbol. eg. BTC/USDT

HTTP Response

Content-Type

application/json

List Order History

Response Example (200)

[
  {
    "id": "3240579942",
    "clientOrderId": "x-xcKtGhcu755a45b026384e6ba56493",
    "timestamp": 1666375929485,
    "datetime": "2022-10-21T18:12:09.485Z",
    "symbol": "BTC/USDT",
    "type": "market",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": false,
    "side": "buy",
    "price": 19299.9,
    "amount": 0.673,
    "cost": 12988.8327,
    "average": 19299.9,
    "filled": 0.673,
    "remaining": 0,
    "status": "closed",
    "trades": [],
    "fees": []
  },
  {
    "id": "3240531998",
    "clientOrderId": "x-xcKtGhcu5fac13aec5a740eb884301",
    "timestamp": 1666361624042,
    "datetime": "2022-10-21T14:13:44.042Z",
    "symbol": "BTC/USDT",
    "type": "market",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": 19149.16657,
    "stopPrice": 19150,
    "amount": 2.106,
    "cost": 40328.1448,
    "average": 19149.16657,
    "filled": 2.106,
    "remaining": 0,
    "status": "closed",
    "trades": [],
    "fees": []
  },
  {
    "id": "3240531985",
    "clientOrderId": "x-xcKtGhcua1774b5ac2c7416880f7e8",
    "timestamp": 1666361622613,
    "datetime": "2022-10-21T14:13:42.613Z",
    "symbol": "BTC/USDT",
    "type": "market",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": false,
    "side": "buy",
    "price": 19351.8,
    "amount": 2.106,
    "cost": 40754.8908,
    "average": 19351.8,
    "filled": 2.106,
    "remaining": 0,
    "status": "closed",
    "trades": [],
    "fees": []
  }
]

API Invoke Function

AdminExchangeExpressJSv1

HTTP Request

GET /v1/admin/exchange/order/<API_KEY_ID>/history

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to get the order history.

Request Query

Parameter Type Required Description
symbol String Yes Exchange symbol. eg. BTC/USDT

HTTP Response

Content-Type

application/json

List Trade History

Response Example (200)

[
  {
    "timestamp": 1666375929485,
    "datetime": "2022-10-21T18:12:09.485Z",
    "symbol": "BTC/USDT",
    "id": "244289655",
    "order": "3240579942",
    "side": "buy",
    "takerOrMaker": "taker",
    "price": 19299.9,
    "amount": 0.673,
    "cost": 12988.8327,
    "fee": {
      "cost": 5.19553307,
      "currency": "USDT"
    },
    "fees": [
      {
        "currency": "USDT",
        "cost": 5.19553307
      }
    ]
  },
  {
    "timestamp": 1666374986261,
    "datetime": "2022-10-21T17:56:26.261Z",
    "symbol": "BTC/USDT",
    "id": "244289243",
    "order": "3240531998",
    "side": "sell",
    "takerOrMaker": "taker",
    "price": 19148.4,
    "amount": 1.097,
    "cost": 21005.7948,
    "fee": {
      "cost": 8.40231792,
      "currency": "USDT"
    },
    "fees": [
      {
        "currency": "USDT",
        "cost": 8.40231792
      }
    ]
  }
]

API Invoke Function

AdminExchangeExpressJSv1

HTTP Request

GET /v1/admin/exchange/trade/<API_KEY_ID>/history

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to get the trade history.

Request Query

Parameter Type Required Description
symbol String Yes Exchange symbol. eg. BTC/USDT

HTTP Response

Content-Type

application/json

Strategy Follower

List Followers

Response Example (200)

{
  "items": [
    {
      "id": "78ca1450-a3a6-459d-ad1b-7c142ae9b2c1",
      "ExchangeKey": {
        "id": "df30b2fa-adc8-47cb-a9f5-be90ae259827",
        "active": true,
        "User": {
          "id": "a12565e5-567b-432a-93b2-6349653010d9",
          "UserProfile": {
            "firstName": "John",
            "lastName": "Doetwo"
          },
          "UserSubscription": {
            "SubscriptionType": {
              "id": "2add42ca-d6fa-4e0c-b410-480258171388",
              "name": "STANDARD",
              "private": false
            }
          }
        },
        "ExchangeKeyBalance": {
          "totalUSD": 13371.62664883,
          "updatedAt": "2022-10-22T00:03:17.820Z"
        }
      },
      "StrategyRiskProfile": {
        "id": "3d321572-52a0-4625-93d3-a4e91c73dcd2",
        "name": "CONSERVATIVE"
      },
      "StrategyAutomatedFollowPerformance": {
        "id": "34ff3bc1-09bb-4514-8f95-1fc23a6b99b8",
        "totalProfit": -78.7057,
        "closedBalance": 13235.62718128,
        "updatedAt": "2022-10-23T05:30:16.339Z"
      }
    }
  ]
}

API Invoke Function

AdminStrategyFollowerExpressJSv1

HTTP Request

GET /v1/admin/strategy/follower/<STRATEGY_ID>/list

Request URL

Parameter Type Required Description
STRATEGY_ID String Yes Strategy ID.

HTTP Response

Content-Type

application/json

New Orders

Request Example

{
  "side": "BUY",
  "stopType": "MARKET",
  "stopPrice": 19350,
  "takeProfitPrices": [19500, 19550, 19600, 19650],
  "strategyFollowIds": [
    "af42792c-b48e-4322-9716-07050cec48c8",
    "9bfa5701-735f-4836-876d-f489630c0acc"
  ]
}

API Invoke Function

AdminStrategyFollowerExpressJSv1

HTTP Request

POST /v1/admin/strategy/follower/<STRATEGY_FOLLOW_ID>

Request URL

Parameter Type Required Description
STRATEGY_FOLLOW_ID String Yes Strategy Follower ID.

HTTP Response

Content-Type

application/json

Close Order

API Invoke Function

AdminStrategyFollowerExpressJSv1

HTTP Request

DELETE /v1/admin/strategy/follower/<STRATEGY_FOLLOW_ID>

Request URL

Parameter Type Required Description
STRATEGY_FOLLOW_ID String Yes Strategy Follower ID.

Close All Orders

API Invoke Function

AdminStrategyFollowerExpressJSv1

HTTP Request

DELETE /v1/admin/strategy/follower/<STRATEGY_ID>/all

Request URL

Parameter Type Required Description
STRATEGY_ID String Yes Strategy ID.

Strategy Trigger

List History

Response Example (200)

{
  "active": true,
  "exchangeId": "BINANCE",
  "symbol": "BTC/USDT",
  "StrategyAutomatedTriggers": {
    "items": [
      {
        "id": "aa51c3f9-5b54-4927-98ef-d30ac182886c",
        "active": false,
        "strategySource": "TRADINGVIEW",
        "tradeSide": "BUY",
        "price": 21600,
        "stop": 21300,
        "stopType": "MARKET",
        "takeProfit": [22300, 22310],
        "createdAt": "2022-11-06T16:53:59.180Z",
        "updatedAt": "2022-11-06T18:12:16.152Z",
        "StrategyAutomatedHistories": {
          "items": [
            {
              "id": "c21d890e-87b6-424d-b010-929612e17011",
              "active": false
            },
            {
              "id": "5101d1c2-b0ee-4741-9c84-9002402bfbf5",
              "active": false
            },
            {
              "id": "bef1f71e-d851-4d39-bbb4-e2e953611a03",
              "active": false
            }
          ]
        }
      }
    ]
  }
}

API Invoke Function

AdminStrategyExpressJSv1

HTTP Request

GET /v1/admin/strategy/trigger/history/<STRATEGY_ID>

Request URL

Parameter Type Required Description
STRATEGY_ID String Yes Strategy ID.

HTTP Response

Content-Type

application/json

Setting Strategy

List Strategy Automated

Response Example (200)

{
  "items": [
    {
      "id": "927bacee-6c0e-4a50-b920-a95ee5013ae9",
      "active": true,
      "name": "STRATEGY #1",
      "description": null,
      "exchangeId": "BINANCE",
      "symbol": "BTC/USDT",
      "reportExchangeApiKey": "t32hMggmL26nkyFPoPkqWe5U7vMRpu3y2wdWCz4CWFHd3dq7W9xyxHoZ73CsqHZhZ",
      "createdAt": "2022-09-27T00:30:14.150Z",
      "updatedAt": "2022-09-27T00:30:14.150Z"
    },
    {
      "id": "353ee234-27da-4cc1-8ec0-e13adb5c7f15",
      "active": true,
      "name": "STRATEGY #2",
      "description": null,
      "exchangeId": "BINANCE",
      "symbol": "BTC/USDT",
      "reportExchangeApiKey": "91QNhDuErgHajrzLnfWaJ9phe7UevjtD9JGGGG06VtfB7dRu13j0KrtLBKVJgsM5D",
      "createdAt": "2022-09-27T01:23:45.678Z",
      "updatedAt": "2022-09-27T01:23:45.678Z"
    }
  ]
}

API Invoke Function

AdminSettingStrategyExpressJSv1

HTTP Request

GET /v1/admin/setting/strategy/list

HTTP Response

Content-Type

application/json

Parameter Type Description
id String STRATEGY_ID.
active Boolean Strategy active status.
name String Strategy display name.
description String/null Strategy description.
exchangeId String EXCHANGE_ID. eg. BINANCE
symbol String Strategy exchange symbol. Must be in format BASE/QUOTE.
reportExchangeApiKey String Strategy exchange API key used to generate strategy performance report.

Create Strategy Automated

Request Example

{
  "name": "STRATEGY #5",
  "exchangeId": "BINANCE",
  "symbol": "BTC/USDT",
  "reportExchangeApiKey": "c4qZMdKgwVrhXEa5ADCavztHspKckYDAHpvTW8AqbA4QHJr5nWFbMBrydtMKd73H",
  "reportExchangeApiSecretKey": "DXnXuCLBWHZdbcSQb7f5aaSeMZfhuP4N7BGhBmSsDbM5ZzIw5qZe6MWzQINTjuND"
}

Response Example (200)

{
  "id": "927bacee-6c0e-4a50-b920-a95ee5013ae9",
  "active": true,
  "name": "STRATEGY #5",
  "description": null,
  "exchangeId": "BINANCE",
  "symbol": "BTC/USDT",
  "reportExchangeApiKey": "c4qZMdKgwVrhXEa5ADCavztHspKckYDAHpvTW8AqbA4QHJr5nWFbMBrydtMKd73H",
  "createdAt": "2022-09-27T00:30:14.150Z",
  "updatedAt": "2022-09-27T00:30:14.150Z"
}

Response Example (422)

{
  "errors": [
    {
      "value": "BTCUSDT",
      "msg": "must be format BASE/QUOTE",
      "param": "symbol",
      "location": "body"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API authorization failed (1103)"
}

API Invoke Function

AdminSettingStrategyExpressJSv1

HTTP Request

POST /v1/admin/setting/strategy

Request Body

Content-Type

application/json

Parameter Type Default Required Description
active Boolean true No Strategy active status.
name String - Yes Strategy display name.
description String null No Strategy description.
exchangeId String - Yes EXCHANGE_ID. eg. BINANCE
symbol String - Yes Strategy exchange symbol. Must be in format BASE/QUOTE.
reportExchangeApiKey String - Yes Strategy exchange API key used to generate strategy performance report.
reportExchangeApiSecretKey String - Yes Strategy exchange API secret key.

HTTP Response

Content-Type

application/json

Update Strategy Automated

Request Example

{
  "active": false
}

Response Example (200)

{
  "id": "927bacee-6c0e-4a50-b920-a95ee5013ae9",
  "active": false,
  "name": "STRATEGY #5",
  "description": null,
  "exchangeId": "BINANCE",
  "symbol": "BTC/USDT",
  "reportExchangeApiKey": "c4qZMdKgwVrhXEa5ADCavztHspKckYDAHpvTW8AqbA4QHJr5nWFbMBrydtMKd73H",
  "createdAt": "2022-09-27T00:30:14.150Z",
  "updatedAt": "2022-09-27T00:30:14.150Z"
}

API Invoke Function

AdminSettingStrategyExpressJSv1

HTTP Request

PUT /v1/admin/setting/strategy/<STRATEGY_ID>

Request URL

Parameter Type Required Description
STRATEGY_ID String Yes Strategy Id to update.

Request Body

Content-Type

application/json

Parameter Type Required Description
active Boolean No Strategy active status.
name String No Strategy display name.
description String No Strategy description.

HTTP Response

Content-Type

application/json

List Strategy Risk Profile

Response Example (200)

{
  "items": [
    {
      "id": "ab00673a-cd19-44d4-a7c4-05c63e309663",
      "name": "CONSERVATIVE",
      "percentage": 1.5,
      "createdAt": "2022-09-09T01:57:36.304Z",
      "updatedAt": "2022-09-09T01:57:36.304Z"
    },
    {
      "id": "3dc38f3d-4b4e-43b3-a102-e250b7cd3551",
      "name": "MODERATE",
      "percentage": 2,
      "createdAt": "2022-09-09T01:58:12.344Z",
      "updatedAt": "2022-09-09T01:58:12.344Z"
    },
    {
      "id": "9234a512-48d0-4fa9-8b77-fdaec0fd3e00",
      "name": "AGGRESSIVE",
      "percentage": 3,
      "createdAt": "2022-09-09T01:59:23.456Z",
      "updatedAt": "2022-09-09T01:59:23.456Z"
    }
  ]
}

API Invoke Function

AdminSettingStrategyExpressJSv1

HTTP Request

GET /v1/admin/setting/strategy/profile/list

HTTP Response

Content-Type

application/json

Parameter Type Description
id String STRATEGY_PROFILE_ID.
name String Strategy risk profile name.
percentage Float Strategy risk profile percentage.
createdAt String Strategy risk profile created at.
updatedAt String Strategy risk profile updated at.

Create Strategy Risk Profile

Request Example

{
  "name": "CONSERVATIVE",
  "percent": 1.5
}

Response Example (200)

{
  "id": "ab00673a-cd19-44d4-a7c4-05c63e309663",
  "name": "CONSERVATIVE",
  "percentage": 1.5,
  "createdAt": "2022-09-09T01:57:36.304Z",
  "updatedAt": "2022-09-09T01:57:36.304Z"
}

Response Example (422)

{
  "errors": [
    {
      "value": "TESTING_1234",
      "msg": "must be alphabet only",
      "param": "name",
      "location": "body"
    }
  ]
}

API Invoke Function

AdminSettingStrategyExpressJSv1

HTTP Request

POST /v1/admin/setting/strategy/profile

Request Body

Content-Type

application/json

Parameter Type Required Description
name Boolean Yes Strategy risk profile name.
percentage Float Yes Strategy risk profile percentage.

HTTP Response

Content-Type

application/json

Update Strategy Risk Profile

Request Example

{
  "percent": 1.7
}

Response Example (200)

{
  "id": "ab00673a-cd19-44d4-a7c4-05c63e309663",
  "name": "CONSERVATIVE",
  "percentage": 1.7,
  "createdAt": "2022-09-09T01:57:36.304Z",
  "updatedAt": "2022-09-09T02:23:45.678Z"
}

API Invoke Function

AdminSettingStrategyExpressJSv1

HTTP Request

PUT /v1/admin/setting/strategy/profile/<STRATEGY_PROFILE_ID>

Request Body

Content-Type

application/json

Parameter Type Required Description
percentage Float Yes Strategy risk profile percentage.

HTTP Response

Content-Type

application/json

Setting Subscription

List Subscription

Response Example (200)

{
  "items": [
    {
      "id": "22fb4056-8893-40f6-81e2-b9264a669d51",
      "name": "BASIC",
      "stripePriceId": "price_1LmHQlEaYDRKzLl0XIs6QIbc",
      "monthlyPriceUSD": 20,
      "maxBalanceUSD": 2500,
      "maxApiKey": 5,
      "private": false,
      "default": false,
      "strategyAutomated": true,
      "createdAt": "2022-10-01T15:28:33.251Z",
      "updatedAt": "2022-10-01T15:28:33.251Z"
    },
    {
      "id": "ee5063ba-5a4f-4159-a860-cd6390086044",
      "name": "DEFAULT",
      "stripePriceId": null,
      "monthlyPriceUSD": null,
      "maxBalanceUSD": 2000,
      "maxApiKey": 3,
      "private": false,
      "default": true,
      "strategyAutomated": false,
      "createdAt": "2022-10-01T15:25:41.607Z",
      "updatedAt": "2022-10-01T15:25:41.607Z"
    }
  ]
}

API Invoke Function

AdminSubscriptionExpressJSv1

HTTP Request

GET /v1/admin/subscription/list

HTTP Response

Content-Type

application/json

Parameter Type Description
id String SUBSCRIPTION_ID.
name String Subscription name.
stripePriceId String Subscription Stripe Price ID.
monthlyPriceUSD Float Subscription monthly price in USD.
maxBalanceUSD Integer Subscription allowed max account balance in USD.
maxApiKey String Subscription allowed max account API keys.
private Boolean Subscription is custom plan.
createdAt String Subscription created at.
updatedAt String Subscription updated at.

Create Subscription

Request Example

{
  "name": "ENTERPRISE 500",
  "monthlyPriceUSD": 500,
  "maxBalanceUSD": 500000,
  "maxApiKey": 50
}

Response Example (200)

{
  "id": "2add42ca-d6fa-4e0c-b410-480258171388",
  "name": "STANDARD",
  "stripePriceId": "price_1M1xdOEaYDRKzLl0mZCDLtut",
  "monthlyPriceUSD": 40,
  "maxBalanceUSD": 5000,
  "maxApiKey": 10,
  "private": false,
  "default": false,
  "strategyAutomated": true,
  "createdAt": "2022-10-01T15:29:00.521Z",
  "updatedAt": "2022-10-01T15:29:00.521Z"
}
{
  "id": "b51466c8-b41b-4937-a730-acfb6b56373f",
  "name": "DEFAULT",
  "stripePriceId": null,
  "monthlyPriceUSD": null,
  "maxBalanceUSD": 1000,
  "maxApiKey": 3,
  "private": false,
  "default": true,
  "strategyAutomated": false,
  "createdAt": "2022-11-08T19:37:56.311Z",
  "updatedAt": "2022-11-08T19:37:56.311Z"
}

Response Example (422)

{
  "errors": [
    {
      "value": "price_1L4StTJfOKOw6aMrej5IgRJCx",
      "msg": "price id does not exist",
      "param": "stripePriceId",
      "location": "body"
    }
  ]
}
{
  "errors": [
    {
      "value": true,
      "msg": "default already exist",
      "param": "default",
      "location": "body"
    }
  ]
}

API Invoke Function

AdminSubscriptionExpressJSv1

HTTP Request

POST /v1/admin/subscription

Request Body

Content-Type

application/json

Parameter Type Default Required Description
name String - Yes Subscription name.
monthlyPriceUSD Float - Yes Subscription monthly price in USD. At the moment, it is for website display only.
maxBalanceUSD Integer - Yes Subscription allowed max account balance in USD.
maxApiKey String - Yes Subscription allowed max account API keys.
private Boolean true No Subscription is custom plan. At the moment, false plans are hard coded for display on the website.
strategyAutomated Boolean true No Subscription to allow automated strategy.
default Boolean false No Set as a default subscription. Only one default true should exist.

HTTP Response

Content-Type

application/json

Update Subscription

Request Example

{
  "maxBalanceUSD": 12345,
  "maxApiKey": 10
}

Response Example (200)

{
  "id": "7528e753-baec-43f0-8dd2-16cd1381e6f4",
  "name": "CUSTOM 123",
  "stripePriceId": "price_1L4SsSJfOKOw6aMrXZO4ZA96",
  "maxBalanceUSD": 12345,
  "maxApiKey": 10,
  "private": true,
  "default": false,
  "strategyAutomated": true,
  "createdAt": "2022-09-09T01:23:45.678Z",
  "updatedAt": "2022-09-09T02:34:56.789Z"
}

Response Example (404)

{
  "message": "route not found"
}

Response Example (422)

{
  "errors": [
    {
      "value": "price_1L4StTJfOKOw6aMrej5IgRJCx",
      "msg": "price id does not exist",
      "param": "stripePriceId",
      "location": "body"
    }
  ]
}

API Invoke Function

AdminSubscriptionExpressJSv1

HTTP Request

PUT /v1/admin/subscription/<SUBSCRIPTION_ID>

Request URL

Parameter Type Required Description
SUBSCRIPTION_ID String Yes Subscription ID to update.

Request Body

Content-Type

application/json

Parameter Type Required Description
name String No Subscription name.
stripePriceId String No Subscription Stripe Price ID.
maxBalanceUSD Integer No Subscription allowed max account balance in USD.
maxApiKey String No Subscription allowed max account API keys.
private Boolean No Subscription is custom plan.
strategyAutomated Boolean No Subscription to allow automated strategy.

HTTP Response

Content-Type

application/json

Setting Notification

Get Notification

Response Example (200)

{
  "notifyUserReachNearMaxBalance": true,
  "notifyAdminUserReachNearMaxBalance": true,
  "notifyWeeklyReport": true,
  "notifyMonthlyReport": false,
  "createdAt": "2022-09-09T01:57:36.304Z",
  "updatedAt": "2022-09-09T01:57:36.304Z"
}

API Invoke Function

AdminSettingNotificationExpressJSv1

HTTP Request

GET /v1/admin/setting/notification

HTTP Response

Content-Type

application/json

Parameter Type Description
notifyUserReachNearMaxBalance Boolean Status to send warning notification to users about balance reaching max balance.
notifyAdminUserReachNearMaxBalance Boolean Status to send admin warning notificaton about a user reaching max balance.
notifyWeeklyReport Boolean Status to send weekly performance report to users.
notifyMonthlyReport Boolean Status to send monthly performance report to users.

Update Notification

Request Example

{
  "notifyMonthlyReport": true
}

Response Example (200)

{
  "notifyUserReachNearMaxBalance": true,
  "notifyAdminUserReachNearMaxBalance": true,
  "notifyWeeklyReport": true,
  "notifyMonthlyReport": true,
  "createdAt": "2022-09-09T01:57:36.304Z",
  "updatedAt": "2022-09-09T02:12:34.567Z"
}

API Invoke Function

AdminSettingNotificationExpressJSv1

HTTP Request

PUT /v1/admin/setting/notification

Request Body

Content-Type

application/json

Parameter Type Required Description
notifyUserReachNearMaxBalance Boolean No Status to send warning notification to users about balance reaching max balance.
notifyAdminUserReachNearMaxBalance Boolean No Status to send admin warning notificaton about a user reaching max balance.
notifyWeeklyReport Boolean No Status to send weekly performance report to users.
notifyMonthlyReport Boolean No Status to send monthly performance report to users.

HTTP Response

Content-Type

application/json

Webhook

Automated Strategy

This endpoint triggers an automated strategy with a specific payload.

Request Example

{
  "strategy": "61b79e6d-7e22-4f91-b508-ef5be6a21419",
  "secret": "secret",
  "orderPrice": "19286.5",
  "callbackRate": "2",
  "trailingTrigger": "95",
  "winRate": "49.55",
  "type": "buy",
  "stop": "19280.4",
  "stopType": "Limit",
  "takeProfit": "NaN",
  "takeProfitPrice1": "19288",
  "takeProfitPrice2": "19289.5",
  "takeProfitPrice3": "19291.1"
}

Response Example (200)

Response Example (401)

{
  "error": "unauthorized"
}

Response Example (422)

{
  "errors": [
    {
      "msg": "must be UUID",
      "param": "strategy",
      "location": "body"
    },
    {
      "msg": "must be greater than 0",
      "param": "orderPrice",
      "location": "body"
    },
    {
      "msg": "must be supported trade side",
      "param": "type",
      "location": "body"
    },
    {
      "msg": "must be greater than 0",
      "param": "stop",
      "location": "body"
    },
    {
      "msg": "must be supported order type",
      "param": "stopType",
      "location": "body"
    }
  ]
}
{
  "errors": [
    {
      "msg": "must include at least one takeProfit",
      "param": "_error",
      "nestedErrors": [
        {
          "msg": "must be greater than 0",
          "param": "takeProfit",
          "location": "body"
        },
        {
          "msg": "must be greater than 0",
          "param": "takeProfit1",
          "location": "body"
        },
        {
          "msg": "must be greater than 0",
          "param": "takeProfit2",
          "location": "body"
        },
        {
          "msg": "must be greater than 0",
          "param": "takeProfit3",
          "location": "body"
        }
      ]
    }
  ]
}

API Invoke Function

StrategyWebhookExpressJSv1

HTTP Request

POST /v1/webhook/strategy

Request Body

Content-Type

application/json

Parameter Type Required Description
strategy String Yes STRATEGY_ID.
secret String Yes Secret access key to authenticate.
orderPrice String/Number Yes Trigger order price.
type String Yes Trade side [buy, sell]
stop String/Number Yes Stop-loss price.
stopType String Yes Stop-loss order type. [limit, market]
trailingTrigger String/Number/null No/Yes Trailing Stop trigger value. It is not trigger price. Must use with callbackRate.
callbackRate String/Number/null No/Yes Trailing Stop callback rate. Must use with trailingTrigger.
takeProfit String/Number/null No/Yes Take profit price. At least one takeProfit must be included.
takeProfit1 String/Number/null No/Yes Take profit price.
takeProfit2 String/Number/null No/Yes Take profit price.
takeProfit3 String/Number/null No/Yes Take profit price.
winRate String/Number Yes

HTTP Response

Content-Type

application/json

Errors

We use the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your JWT is invalid or expired.
403 Forbidden -- Your request is unauthorized.
404 Not Found -- Your request route could not be found.
422 Unprocessable -- Your request is valid, but it could not process the contained instructions.
429 Too Many Requests -- Too many request.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.