NAV

Introduction

Welcome to the developer API documentation.

Recent Changes

Oct 30, 2022

Oct 15, 2022

Authentication

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

ReCaptcha

We use Google ReCAPTCHA v3 to ensure the API request is by a person using the website with a better experience. Any request method with POST, PUT or DELETE must include the headers with recaptcha-token-v3. Google ReCAPTCHA v3 Documentation.

Public Data

Get Exchange Ticker

This endpoint retrieves the exchange symbol price ticker.

Response Example (200)

{
  "symbol": "BTC/USDT",
  "timestamp": 1663340989057,
  "datetime": "2022-09-16T15:09:49.057Z",
  "high": 19947.56,
  "low": 19442.76,
  "vwap": 19749.02184908,
  "open": 19693.41,
  "close": 19669.28,
  "last": 19669.28,
  "change": -24.13,
  "percentage": -0.123,
  "average": 19681.345,
  "baseVolume": 280360.89577,
  "quoteVolume": 5536853456.188337
}

Response Example (422)

{
  "errors": [
    {
      "value": "BTCUSDT",
      "msg": "must be valid exchange symbol",
      "param": "symbol",
      "location": "query"
    }
  ]
}

Response Example (433)

{
  "error": "invalid exchange symbol (1300)"
}

API Invoke Function

PublicExchangeExpressJSv1

HTTP Request

GET /v1/pub/exchange/ticker

Request Query

Parameter Type Default Required Description
exchangeId String BINANCE No Filter by EXCHANGE_ID. [BINANCE]
symbol String BTC/USDT No Filter by exchange symbol. eg. BTC/USDT
type String FUTURES No Filter by exchange trade type. [SPOT, FUTURES]

HTTP Response

Content-Type

application/json

List Subscriptions Plans

This endpoint list public subscription plans. It does not include private subscriptions.

Response Example (200)

{
  "items": [
    {
      "id": "336e0577-784d-4482-8a37-46649118aa51",
      "name": "BASIC",
      "monthlyPriceUSD": 20,
      "maxBalanceUSD": 2500,
      "maxApiKey": 2,
      "strategyAutomated": true
    },
    {
      "id": "eedb6709-40be-4425-bc8c-3f27b0f16606",
      "name": "ADVANCED",
      "monthlyPriceUSD": 40,
      "maxBalanceUSD": 5000,
      "maxApiKey": 3,
      "strategyAutomated": true
    },
    {
      "id": "d6e3155b-caed-449c-b95b-857f1b765040",
      "name": "PROFESSIONAL",
      "monthlyPriceUSD": 60,
      "maxBalanceUSD": 10000,
      "maxApiKey": 5,
      "strategyAutomated": true
    }
  ]
}

API Invoke Function

PublicSubscriptionExpressJSv1

HTTP Request

GET /v1/pub/subscription/list

HTTP Response

Content-Type

application/json

Parameter Type Description
id String SUBSCRIPTION_ID.
name String Subscription name.
monthlyPriceUSD Float Subscription monthly price in USD.
maxBalanceUSD Integer Subscription allowed max account balance in USD.
maxApiKey String Subscription allowed max account API keys.
strategyAutomated Boolean Subscription status to allow to follow the automated strategy.

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

PublicStrategyExpressJSv1

HTTP Request

GET /v1/pub/strategy/profile/list

HTTP Response

Content-Type

application/json

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

List Strategy Automated

Response Example (200)

{
  "items": [
    {
      "id": "b9f67eb2-1d6e-4a47-a735-d0d9039c9b08",
      "active": true,
      "name": "STRATEGY #1",
      "description": null,
      "exchangeId": "BINANCE",
      "symbol": "BTC/USDT",
      "createdAt": "2022-09-09T01:57:36.304Z",
      "updatedAt": "2022-09-09T01:57:36.304Z"
    },
    {
      "id": "b762dad3-b720-4ddd-a515-32ae48e39f94",
      "active": true,
      "name": "STRATEGY #2",
      "description": null,
      "exchangeId": "BINANCE",
      "symbol": "BTC/USDT",
      "createdAt": "2022-09-09T01:58:45.678Z",
      "updatedAt": "2022-09-09T01:58:45.678Z"
    },
    {
      "id": "fa142ba2-9a7f-48ab-b182-4e47a1f242b6",
      "active": true,
      "name": "STRATEGY #3",
      "description": null,
      "exchangeId": "BINANCE",
      "symbol": "BTC/USDT",
      "createdAt": "2022-09-09T01:59:56.789Z",
      "updatedAt": "2022-09-09T01:59:56.789Z"
    },
    {
      "id": "f330861a-464a-436e-872a-d82d95666d80",
      "active": true,
      "name": "STRATEGY #4",
      "description": null,
      "exchangeId": "BINANCE",
      "symbol": "BTC/USDT",
      "createdAt": "2022-09-09T02:01:23.456",
      "updatedAt": "2022-09-09T02:01:23.456"
    }
  ]
}

API Invoke Function

PublicStrategyExpressJSv1

HTTP Request

GET /v1/pub/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.
symbol String Strategy exchange symbol.
createdAt String Strategy created at.
updatedAt String trategy updated at.

List Strategy History

Response Example (200)

{
  "items": [
    {
      "start": "2022-10-19",
      "endAt": "2022-10-20",
      "netProfitPercent": -5.62505875,
      "winRate": 0.25,
      "maxDrawDown": 0.05625059,
      "trades": 4,
      "long": 4,
      "short": 0
    },
    {
      "start": "2022-10-18",
      "endAt": "2022-10-19",
      "netProfitPercent": null,
      "winRate": null,
      "maxDrawDown": null,
      "trades": 0,
      "long": 0,
      "short": 0
    },
    {
      "start": "2022-10-17",
      "endAt": "2022-10-18",
      "netProfitPercent": null,
      "winRate": null,
      "maxDrawDown": null,
      "trades": 0,
      "long": 0,
      "short": 0
    }
  ]
}

API Invoke Function

PublicStrategyExpressJSv1

HTTP Request

GET /v1/pub/strategy/<STRATEGY_ID>/history

Request URL

Parameter Type Required Description
STRATEGY_ID String Yes Strategy ID.

Request Query

Parameter Type Default Required Description
interval String 1d No Range interval. [1d, 1M]
limit Integer 30 No Limit history list. (Max: 1000)

HTTP Response

Content-Type

application/json

Parameter Type Description
start String Strategy range start. (Inclusive)
endAt String Strategy range end at. (Exclusive)
netProfitPercent Float Strategy range of net profit percentage.
winRate Float Strategy range of win rate.
maxDrawDown Float Strategy range of max draw down.
trades Integer Strategy total trades.
long Integer Strategy total LONG trades.
short Integer Strategy totalSHORT trades.

Get Strategy Performance

This endpoint retrieves the total of the strategy history range.

Response Example (200)

{
  "netProfitPercent": -5.62505875,
  "winRate": 0.25,
  "maxDrawDown": 0.05625059,
  "trades": 4,
  "long": 4,
  "short": 0
}

API Invoke Function

PublicStrategyExpressJSv1

HTTP Request

GET /v1/pub/strategy/<STRATEGY_ID>/performance

Request URL

Parameter Type Required Description
STRATEGY_ID String Yes Strategy ID.

Request Query

Parameter Type Default Required Description
interval String 1d No Range interval. [1d, 1M]
limit Integer 30 No Limit history list. (Max: 1000)

HTTP Response

Content-Type

application/json

Parameter Type Description
netProfitPercent Float Strategy range of net profit percentage.
winRate Float Strategy range of win rate.
maxDrawDown Float Strategy range of max draw down.
trades Integer Strategy total trades.
long Integer Strategy total LONG trades.
short Integer Strategy totalSHORT trades.

Account Profile

Get User Profile

Response Example (200)

{
  "lastName": "John",
  "firstName": "Doe",
  "country": "CA",
  "language": "EN",
  "timezone": "America/Toronto",
  "createdAt": "2022-09-09T01:57:36.304Z",
  "updatedAt": "2022-09-09T01:57:36.304Z"
}

API Invoke Function

AccountProfileExpressJSv1

HTTP Request

GET /v1/priv/account/profile

HTTP Response

Content-Type

application/json

Parameter Type Description
lastName String/null Last name of the account user.
firstName String/null First name of the account user.
country String/null Country code of the account user.
language String/null Preferred or preset language.
timezone String/null Preferred or preset timezone.
createdAt String Profile created datetime.
updatedAt String Profile updated datetime.

Put User Profile

Request Example

{
  "language": "AR"
}

Response Example (200)

{
  "lastName": "John",
  "firstName": "Doe",
  "country": "CA",
  "language": "AR",
  "timezone": "America/Toronto",
  "createdAt": "2022-09-09T00:12:34.567Z",
  "updatedAt": "2022-09-09T01:57:36.304Z"
}

Response Example (422)

{
  "errors": [
    {
      "value": "Doe123",
      "msg": "must be alpha character",
      "param": "lastName",
      "location": "body"
    },
    {
      "value": "CAX",
      "msg": "must be valid country",
      "param": "country",
      "location": "body"
    },
    {
      "value": "ENX",
      "msg": "must be a valid language",
      "param": "language",
      "location": "body"
    },
    {
      "value": "America/Torontox",
      "msg": "must be a valid timezone",
      "param": "timezone",
      "location": "body"
    }
  ]
}

API Invoke Function

AccountProfileExpressJSv1

HTTP Request

PUT /v1/priv/account/profile

Request Body

Content-Type

application/json

Parameter Type Required Description
lastName String No Last name of the account user.
firstName String No First name of the account user.
country String No Country code of the account user. [Alpha-2 Code List]
language String No Preferred language. [EN, AR]
timezone String No Preferred timezone. [Moment Timezone List]

HTTP Response

Content-Type

application/json

Account Exchange

List Whitelist IP address

This endpoint retrieves all the proxy server IP addresses that the user exchange API keys should whitelist.

Response Example (200)

[
  "15.137.11.254",
  "221.110.159.85",
  "37.61.167.239",
  "13.24.123.234",
  "180.134.167.57"
]

API Invoke Function

AccountExchangeExpressJSv1

HTTP Request

GET /v1/priv/account/exchange/whitelist/ip

HTTP Response

Content-Type

application/json

Get Exchange Total Balance

This endpoint retrieves the total sum of active API key balances.

Response Example (200)

{
  "USD": 12345.12
}

API Invoke Function

AccountExchangeExpressJSv1

HTTP Request

GET /v1/priv/account/exchange/balance

HTTP Response

Content-Type

application/json

Parameter Type Description
USD Float A total sum of account active API key balances.

Account Exchange Key

List Exchange Keys

Response Example (200)

{
  "items": [
    {
      "id": "46a19fb1-4e90-4736-b820-257c947fd694",
      "exchangeId": "BINANCE",
      "tradeType": "SPOT",
      "strategyType": "MANUAL",
      "active": true,
      "name": "Manul spot account",
      "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": "AUTOMATED",
      "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

AccountExchangeExpressJSv1

HTTP Request

GET /v1/priv/account/exchange/key/list

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 strategy 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.

Create Exchange Key

Request Example

{
  "exchangeId": "BINANCE",
  "tradeType": "FUTURES",
  "strategyType": "AUTOMATED",
  "name": "Default",
  "apiKey": "gwkoDxyKVqm0JsGKAH7Bfy8e542kAVh5iMNz6Xy4sybMZwoWejUoXfEfk7CTdHnbV",
  "apiSecretKey": "3RWimEgZb55DLNm0UKCNbpjX0rEEcGby9dgwYRnNBqH4ndT2F5jkfhN8qdVPK5H4Z"
}

Response Example (200)

{
  "id": "63d3aa7c-3fb0-4a4e-9249-4e1fee947de2",
  "exchangeId": "BINANCE",
  "tradeType": "FUTURES",
  "strategyType": "AUTOMATED",
  "active": true,
  "name": "Default",
  "apiKeyStatus": "AUTHORIZED",
  "apiKey": "gwkoDxyKVqm0JsGKAH7Bfy8e542kAVh5iMNz6Xy4sybMZwoWejUoXfEfk7CTdHnbV",
  "createdAt": "2022-09-09T02:02:15.567Z",
  "updatedAt": "2022-09-09T02:02:15.567Z"
}

Response Example (422)

{
  "errors": [
    {
      "value": "SPOT",
      "msg": "cannot be assigned to AUTOMATED strategy",
      "param": "tradeType",
      "location": "body"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API authorization failed (1103)"
}
{
  "error": "exchange API key already exist (1109)"
}
{
  "error": "exceed subscription max API key limit (2129a)"
}
{
  "error": "exceed subscription max API balance limit (2129b)"
}

API Invoke Function

AccountExchangeExpressJSv1

HTTP Request

POST /v1/priv/account/exchange/key

Request Body

Content-Type

application/json

Parameter Type Default Required Description
exchangeId String - Yes Exchange ID. [BINANCE]
tradeType String - Yes API Key trade type. [SPOT, FUTURES]
strategyType String - Yes API Key strategy type. Only strategyType MANUAL can assign tradeType SPOT or FUTURES. Only FUTURES can be assigned to strategyType AUTOMATED. [AUTOMATED, MANUAL]
active Boolean true No Exchange API key active.
name String - Yes User defined name of the API key.
apiKey String - Yes Exchange API key.
apiSecretKey String - Yes Exchange API secret key.

HTTP Response

Content-Type

application/json

Update Exchange Key

Request Example

{
  "name": "Change to different name"
}

Response Example (200)

{
  "id": "63d3aa7c-3fb0-4a4e-9249-4e1fee947de2",
  "exchangeId": "BINANCE",
  "tradeType": "FUTURES",
  "strategyType": "AUTOMATED",
  "active": true,
  "name": "Change to different name",
  "apiKeyStatus": "AUTHORIZED",
  "apiKey": "gwkoDxyKVqm0JsGKAH7Bfy8e542kAVh5iMNz6Xy4sybMZwoWejUoXfEfk7CTdHnbV",
  "createdAt": "2022-09-09T02:02:15.567Z",
  "updatedAt": "2022-09-09T05:01:23.456Z"
}

Response Example (404)

{
  "message": "route not found"
}

Response Example (422)

{
  "errors": [
    {
      "value": "invalid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    },
    {
      "value": "this is example of very long text input",
      "msg": "length must be less than 25",
      "param": "name",
      "location": "body"
    }
  ]
}

API Invoke Function

AccountExchangeExpressJSv1

HTTP Request

PUT /v1/priv/account/exchange/key/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to update.

Request Body

Content-Type

application/json

Parameter Type Required Description
name String No User defined name of the API key.

HTTP Response

Content-Type

application/json

Delete Exchange Key

Response Example (404)

{
  "message": "route not found"
}

Response Example (422)

{
  "errors": [
    {
      "value": "invalid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

API Invoke Function

AccountExchangeExpressJSv1

HTTP Request

DELETE /v1/priv/account/exchange/key/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to update.

Get Exchange Key Balance

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

Response Example (200)

{
  "free": {
    "BNB": 0,
    "USDT": 2383.52587258,
    "BUSD": 0
  },
  "used": {
    "BNB": 0,
    "USDT": 0,
    "BUSD": 0
  },
  "total": {
    "BNB": 0,
    "USDT": 2383.52587258,
    "BUSD": 0
  }
}

Response Example (404)

{
  "message": "route not found"
}

Response Example (422)

{
  "errors": [
    {
      "value": "invalid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

Response Example (433)

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

API Invoke Function

AccountExchangeExpressJSv1

HTTP Request

GET /v1/priv/account/exchange/key/<API_KEY_ID>/balance

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.

List Exchange Key Balance History

This endpoint retrieves a snapshot of the active exchange key balance every day.

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

AccountExchangeExpressJSv1

HTTP Request

GET /v1/priv/account/exchange/key/<API_KEY_ID>/balance/history

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 date 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.

Account Notification

Get Alert Method

Response Example (200)

{
  "telegramBotUrl": "https://t.me/example",
  "telegramAuthCode": "8pvv88pj",
  "telegramActive": false,
  "createdAt": "2022-09-09T05:01:23.567Z",
  "updatedAt": "2022-09-09T05:01:23.567Z"
}

API Invoke Function

AccountNotificationExpressJSv1

HTTP Request

GET /v1/priv/account/notification/method

HTTP Response

Content-Type

application/json

Parameter Type Description
telegramBotUrl String Telegram Bot URL to link the account.
telegramAuthCode String Telegram auth code to link account for notification.
telegramActive Boolean Telegram alert method status. false if Telegram is not linked or deactivated.
createdAt String Alert method first created at
updatedAt String Alert method last updated at.

Get Notification Settings

Response Example (200)

{
  "weeklyReport": true,
  "monthlyReport": true,
  "emailNewOrder": true,
  "emailTakeProfit": true,
  "emailStopLoss": true,
  "telegramNewOrder": false,
  "telegramTakeProfit": false,
  "telegramStopLoss": false,
  "createdAt": "2022-09-09T05:01:23.456Z",
  "updatedAt": "2022-09-09T05:01:23.456Z"
}

API Invoke Function

AccountNotificationExpressJSv1

HTTP Request

GET /v1/priv/account/notification

HTTP Response

Content-Type

application/json

Parameter Type Description
weeklyReport Boolean Status to receive weekly report.
monthlyReport Boolean Status to receive monthly report.
emailNewOrder Boolean Status to receive new order by email.
emailTakeProfit Boolean Status to receive take profit order by email.
emailStopLoss Boolean Status to receive stop loss order by email.
telegramNewOrder Boolean Status to receive new order by telegram.
telegramTakeProfit Boolean Status to receive take profit order by telegram.
telegramStopLoss Boolean Status to receive stop loss order by telegram.
updatedAt String Status update datetime.

Put Notification Settings

Request Example

{
  "weeklyReport": true,
  "monthlyReport": false,
  "emailNewOrder": true,
  "emailTakeProfit": true,
  "emailStopLoss": true
}

Response Example (200)

{
  "weeklyReport": true,
  "monthlyReport": false,
  "emailNewOrder": true,
  "emailTakeProfit": true,
  "emailStopLoss": true,
  "telegramNewOrder": false,
  "telegramTakeProfit": false,
  "telegramStopLoss": false,
  "createdAt": "2022-09-09T05:02:34.567Z",
  "updatedAt": "2022-09-09T05:02:34.567Z"
}

Response Example (422)

{
  "errors": [
    {
      "value": true,
      "msg": "account must be linked to Telegram",
      "param": "telegramNewOrder",
      "location": "body"
    }
  ]
}

API Invoke Function

AccountNotificationExpressJSv1

HTTP Request

PUT /v1/priv/account/notification

Request Body

Content-Type

application/json

Parameter Type Required Description
weeklyReport Boolean No Status to receive weekly report.
monthlyReport Boolean No Status to receive monthly report.
emailNewOrder Boolean No Status to receive new order by email.
emailTakeProfit Boolean No Status to receive take profit order by email.
emailStopLoss Boolean No Status to receive stop loss order by email.
telegramNewOrder Boolean No Status to receive new order by Telegram. To set true, Telegram must be linked to the account.
telegramTakeProfit Boolean No Status to receive take profit order by telegram. To set true, Telegram must be linked to the account.
telegramStopLoss Boolean No Status to receive stop loss order by telegram. To set true, Telegram must be linked to the account.

HTTP Response

Content-Type

application/json

Account Subscription

Get User Subscription

Response Example (200)

{
  "paymentType": "STRIPE",
  "SubscriptionType": {
    "id": "eefffe05-5d1d-4be8-a300-20c7c39c9fef",
    "name": "BASIC",
    "maxBalanceUSD": 2500,
    "maxApiKey": 3,
    "strategyAutomated": true
  }
}

API Invoke Function

AccountSubscriptionExpressJSv1

HTTP Request

GET /v1/priv/account/subscription

HTTP Response

Content-Type

application/json

Parameter Type Description
paymentType String Active subscription payment type. [STRIPE]

SubscriptionType

Parameter Type Description
id String SUBSCRIPTION_ID can be both public and private.
name String Active subscription type name.
maxBalancceUSD Integer Subscription max allowed balance in USD.
maxApiKey Integer Subscription max allowed API keys.
strategyAutomated Boolean Subscription status to allow to follow the automated strategy.

Account Subscription Stripe

Get Stripe Subscription

This endpoint retrieves the customer's first active subscription data.

Response Example (200)

{
  "cancelAtPeriodEnd": true,
  "cancelAt": "2022-10-24T12:20:08.000Z",
  "currentPeriodStart": "2022-09-24T12:20:08.000Z",
  "currentPeriodEnd": "2022-10-24T12:20:08.000Z",
  "trialStart": null,
  "trialEnd": null,
  "plan": {
    "amount": 2000,
    "currency": "usd",
    "interval": "month",
    "trialPeriodDays": null
  }
}

API Invoke Function

AccountSubscriptionExpressJSv1

HTTP Request

GET /v1/priv/account/subscription/stripe

HTTP Response

Content-Type

application/json

Parameter Type Description
cancelAtPeriodEnd Boolean You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period.
cancelAt String/null If the subscription has been canceled, the date of that cancellation.
currentPeriodStart String Start of the current period that the subscription has been invoiced for.
currentPeriodEnd String End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
trialStart String/null If the subscription has a trial, the beginning of that trial.
trialEnd String/null If the subscription has a trial, the end of that trial.

plan

Parameter Type Description
amount Integer The unit amount in cents to be charged.
currency String Three-letter ISO currency code, in lowercase.
interval String The frequency at which a subscription is billed. [day, week, month, year]
trialPeriodDays Integer/null Default number of trial days when subscribing a customer to this plan.

Create Stripe Subscription Checkout

This endpoint creates a Stripe subscription checkout URL if no active subscription exists. If you need to change the subscription plan, refer to Update Stripe Subscription. The payment type must be STRIPE if other options are available.

Response Example (200)

{
  "url": "https://checkout.stripe.com/c/pay/...",
  "successUrl": "https://example.com/account/subscription",
  "cancelUrl": "https://example.com/account/subscription"
}

Response Example (422)

{
  "errors": [
    {
      "value": "eefffe05-5d1d-4be8-a300-20c7c39c9fee",
      "msg": "must be valid subscription id",
      "param": "subscriptionId",
      "location": "body"
    }
  ]
}

Response Example (433)

{
  "error": "invalid subscription type (2100)"
}
{
  "error": "active stripe subscription already exist (3109)"
}

API Invoke Function

AccountSubscriptionExpressJSv1

HTTP Request

POST /v1/priv/account/subscription/stripe/checkout

Request Body

Content-Type

application/json

Parameter Type Required Description
subscriptionId String Yes Public SUBSCRIPTION_ID to get the checkout URL.

HTTP Response

Content-Type

application/json

Parameter Type Description
url String Stripe subscription checkout for SUBSCRIPTION_ID.
successUrl String Redirect URL after checkout is a success.
cancelUrl String Redirect URL after checkout is canceled.

Update Stripe Subscription

This endpoint updates the customer's active Stripe subscription.

Request Example

{
  "cancelAtPeriodEnd": true
}

Response Example (200)

{
  "cancelAtPeriodEnd": true,
  "cancelAt": "2022-10-24T12:20:08.000Z",
  "currentPeriodStart": "2022-09-24T12:20:08.000Z",
  "currentPeriodEnd": "2022-10-24T12:20:08.000Z",
  "trialStart": null,
  "trialEnd": null,
  "plan": {
    "amount": 2000,
    "currency": "usd",
    "interval": "month",
    "trialPeriodDays": null
  }
}

Response Example (422)

{
  "errors": [
    {
      "value": "eefffe05-5d1d-4be8-a300-20c7c39c9fee",
      "msg": "must be valid subscription id",
      "param": "subscriptionId",
      "location": "body"
    }
  ]
}

Response Example (433)

{
  "error": "active stripe subscription does not exist (3104)"
}

API Invoke Function

AccountSubscriptionExpressJSv1

HTTP Request

PUT /v1/priv/account/subscription/stripe

Request Body

Content-Type

application/json

Parameter Type Required Description
cancelAtPeriodEnd Boolean No Boolean indicating whether this subscription should cancel at the end of the current period.
subscriptionId String No Public SUBSCRIPTION_ID to change the subscription plan to.

HTTP Response

Content-Type

application/json

List Stripe Billing History

This endpoint retrieves the customer's finalized paid Stripe Invoices.

Response Example (200)

[
  {
    "number": "AF046ED1-0001",
    "currency": "usd",
    "amountPaid": 2000,
    "periodStart": "2022-09-24T12:20:08.000Z",
    "periodEnd": "2022-09-24T12:20:08.000Z",
    "hostedUrl": "https://invoice.stripe.com/i/...",
    "pdf": "https://pay.stripe.com/invoice/...",
    "createdAt": "2022-09-24T12:20:08.000Z"
  },
  ...
]

API Invoke Function

AccountSubscriptionExpressJSv1

HTTP Request

GET /v1/priv/account/subscription/stripe/billing/history

HTTP Response

Content-Type

application/json

Parameter Type Description
number String A unique, identifying string that appears on emails sent to the customer for this invoice.
currency String Three-letter ISO currency code, in lowercase.
amountPaid Integer The amount, in cents, that was paid.
periodStart String/null Start of the usage period during which invoice items were added to this invoice.
periodEnd String/null End of the usage period during which invoice items were added to this invoice.
hostedUrl String The URL for the hosted invoice page, which allows customers to view and pay an invoice.
pdf String The link to download the PDF for the invoice.
createdAt String Datetime at which the object was created

Account Trade History

List Strategy Automated History

Response Example (200)

{
  "items": [
    {
      "orderId": "3237790823",
      "price": 19580.1,
      "amount": 0.121,
      "cost": 2369.1921,
      "stop": 19650,
      "stopType": "MARKET",
      "takeProfit": [19400, 19500],
      "trailingTriggerPrice": null,
      "leverage": 7,
      "callbackRate": null,
      "riskProfilePercent": 2,
      "createdAt": "2022-10-14T14:03:45.064Z",
      "StrategyAutomatedTrigger": {
        "StrategyAutomated": {
          "name": "strategy #1",
          "exchangeId": "BINANCE",
          "symbol": "BTC/USDT"
        },
        "tradeSide": "SELL"
      }
    },
    {
      "orderId": "3237478932",
      "price": 19160,
      "amount": 0.247,
      "cost": 4732.52,
      "stop": 19300,
      "stopType": "MARKET",
      "takeProfit": [19100, 19150],
      "trailingTriggerPrice": null,
      "leverage": 11,
      "callbackRate": null,
      "riskProfilePercent": 2,
      "createdAt": "2022-10-14T00:33:35.359Z",
      "StrategyAutomatedTrigger": {
        "StrategyAutomated": {
          "name": "strategy #1",
          "exchangeId": "BINANCE",
          "symbol": "BTC/USDT"
        },
        "tradeSide": "SELL"
      }
    }
  ],
  "nextToken": null
}

API Invoke Function

AccountTradeHistoryExpressJSv1

HTTP Request

GET /v1/priv/account/trade/strategy/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

Response Example (200)

{
  "items": [
    {
      "orderId": "3237885588",
      "price": 19205.3,
      "amount": 0.05,
      "cost": 960.265,
      "stop": 19000,
      "stopType": "LIMIT",
      "takeProfit": [19250, 19300],
      "trailingTriggerPrice": 19000,
      "callbackRate": null,
      "riskProfilePercent": null,
      "createdAt": "2022-10-14T19:37:43.229Z"
    },
    {
      "orderId": "3237884228",
      "price": 19203.8,
      "amount": 0.05,
      "cost": 960.19,
      "stop": 19000,
      "stopType": "LIMIT",
      "takeProfit": [19250, 19300],
      "trailingTriggerPrice": 19000,
      "callbackRate": null,
      "riskProfilePercent": null,
      "createdAt": "2022-10-14T19:32:26.059Z"
    }
  ],
  "nextToken": null
}

API Invoke Function

AccountTradeHistoryExpressJSv1

HTTP Request

GET /v1/priv/account/trade/manual/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

Exchange Order

List Open Orders

Response Example (200)

[
  {
    "id": "3228535237",
    "symbol": "BTC/USDT",
    "type": "stop_market",
    "clientOrderId": "x-xcKtGhcu75fd06b90f5c4de6acbda7",
    "datetime": "2022-10-04T19:37:24.092Z",
    "timeInForce": "GTE_GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": null,
    "stopPrice": 19850,
    "amount": null,
    "cost": 0,
    "average": null,
    "filled": 0,
    "remaining": null,
    "status": "open",
    "fee": null,
    "trades": [],
    "fees": []
  },
  {
    "id": "3228535241",
    "symbol": "BTC/USDT",
    "type": "take_profit_market",
    "clientOrderId": "x-xcKtGhcued11523814b6445fac8196",
    "datetime": "2022-10-04T19:37:24.294Z",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": null,
    "stopPrice": 20100,
    "amount": 0.076,
    "cost": 0,
    "average": null,
    "filled": 0,
    "remaining": 0.076,
    "status": "open",
    "fee": null,
    "trades": [],
    "fees": []
  },
  {
    "id": "3228535243",
    "symbol": "BTC/USDT",
    "type": "take_profit_market",
    "clientOrderId": "x-xcKtGhcu8e14158aa9a645a9902b83",
    "datetime": "2022-10-04T19:37:24.491Z",
    "timeInForce": "GTE_GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": null,
    "stopPrice": 20150,
    "amount": null,
    "cost": 0,
    "average": null,
    "filled": 0,
    "remaining": null,
    "status": "open",
    "fee": null,
    "trades": [],
    "fees": []
  }
]

Response Example (422)

{
  "errors": [
    {
      "value": "invaliduuid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

Response Example (433)

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

API Invoke Function

ExchangeExpressJSv1

HTTP Request

GET /v1/priv/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": "3228535237",
    "symbol": "BTC/USDT",
    "type": "market",
    "clientOrderId": "x-xcKtGhcu75fd06b90f5c4de6acbda7",
    "datetime": "2022-10-04T19:37:24.092Z",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": 19846.3,
    "stopPrice": 19850,
    "amount": 0.153,
    "cost": 3036.4839,
    "average": 19846.3,
    "filled": 0.153,
    "remaining": 0,
    "status": "closed",
    "fee": null,
    "trades": [],
    "fees": []
  },
  {
    "id": "3228535232",
    "symbol": "BTC/USDT",
    "type": "market",
    "clientOrderId": "x-xcKtGhcud59a08d8fb494077871bae",
    "datetime": "2022-10-04T19:37:23.681Z",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": false,
    "side": "buy",
    "price": 20001.2,
    "stopPrice": null,
    "amount": 0.153,
    "cost": 3060.1836,
    "average": 20001.2,
    "filled": 0.153,
    "remaining": 0,
    "status": "closed",
    "fee": null,
    "trades": [],
    "fees": []
  },
  ...
]

Response Example (422)

{
  "errors": [
    {
      "value": "invaliduuid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

Response Example (433)

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

API Invoke Function

ExchangeExpressJSv1

HTTP Request

GET /v1/priv/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)

[
  {
    "id": "243302234",
    "order": "3228535237",
    "symbol": "BTC/USDT",
    "type": null,
    "datetime": "2022-10-04T20:08:26.289Z",
    "side": "sell",
    "takerOrMaker": "taker",
    "price": 19846.3,
    "amount": 0.132,
    "cost": 2619.7116,
    "fee": {
      "cost": 1.04788463,
      "currency": "USDT"
    },
    "fees": [
      {
        "currency": "USDT",
        "cost": 1.04788463
      }
    ]
  },
  {
    "id": "243302233",
    "order": "3228535237",
    "symbol": "BTC/USDT",
    "type": null,
    "datetime": "2022-10-04T20:08:26.289Z",
    "side": "sell",
    "takerOrMaker": "taker",
    "price": 19846.3,
    "amount": 0.021,
    "cost": 416.7723,
    "fee": {
      "cost": 0.16670892,
      "currency": "USDT"
    },
    "fees": [
      {
        "currency": "USDT",
        "cost": 0.16670892
      }
    ]
  },
  ...
]

Response Example (422)

{
  "errors": [
    {
      "value": "invaliduuid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

Response Example (433)

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

API Invoke Function

ExchangeExpressJSv1

HTTP Request

GET /v1/priv/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

Get Futures Open Position

Response Example (200)

{
  "symbol": "BTC/USDT",
  "contracts": 0.1,
  "contractSize": 1,
  "unrealizedPnl": -9.43149184,
  "leverage": 4,
  "liquidationPrice": 7930.83500535,
  "collateral": 1218.83733447,
  "notional": 1994.55850815,
  "markPrice": 19945.58508151,
  "entryPrice": 20039.9,
  "initialMargin": 498.63962703,
  "initialMarginPercentage": 0.25,
  "maintenanceMargin": 19.9455850815,
  "maintenanceMarginPercentage": 0.01,
  "marginRatio": 0.0164,
  "datetime": "2022-10-04T16:44:56.193Z",
  "marginMode": "cross",
  "marginType": "cross",
  "side": "long",
  "hedged": false,
  "percentage": -1.89
}

Response Example (422)

{
  "errors": [
    {
      "value": "6645920d-08cb-44f0-b8b3-a14dd918a7b0x",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API authorization failed (1103)"
}
{
  "error": "exchange API key type is invalid (1106)"
}

API Invoke Function

ExchangeExpressJSv1

HTTP Request

GET /v1/priv/exchange/position/<API_KEY_ID>

Request URL

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

Request Query

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

HTTP Response

Content-Type

application/json

Exchange Order Execute

Create Manual Order

This endpoint creates a manual trading order. It will clear active positions or open orders. The exchange API key strategy type value must be MANUAL, and the trade type must be FUTURES.

Request Example

{
  "symbol": "BTC/USDT",
  "type": "MARKET",
  "side": "BUY",
  "amount": "0.05",
  "takeProfitPrices": [19250, 19300],
  "stopTriggerPrice": 19000,
  "stopTriggerType": "LIMIT",
  "stopPrice": 19000
}

Response Example (200)

[
  {
    "id": "3235803329",
    "clientOrderId": "x-xcKtGhcu909cf9b2fc6b4c51ac850f",
    "symbol": "BTC/USDT",
    "type": "market",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": false,
    "side": "buy",
    "price": 19191.9,
    "amount": 0.05,
    "cost": 959.595,
    "average": 19191.9,
    "filled": 0.05,
    "remaining": 0,
    "status": "closed",
    "trades": [],
    "fees": []
  },
  {
    "id": "3235803331",
    "clientOrderId": "x-xcKtGhcu9b8bbbd2662543eb9373b2",
    "timestamp": 1665522363069,
    "datetime": "2022-10-11T21:06:03.069Z",
    "symbol": "BTC/USDT",
    "type": "take_profit",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": 19250,
    "stopPrice": 19250,
    "amount": 0.025,
    "cost": 0,
    "filled": 0,
    "remaining": 0.025,
    "status": "open",
    "trades": [],
    "fees": []
  },
  {
    "id": "3235803333",
    "clientOrderId": "x-xcKtGhcu7624aa8d23e6407c96d89c",
    "timestamp": 1665522363272,
    "datetime": "2022-10-11T21:06:03.272Z",
    "symbol": "BTC/USDT",
    "type": "take_profit",
    "timeInForce": "GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": 19300,
    "stopPrice": 19300,
    "amount": 0.025,
    "cost": 0,
    "filled": 0,
    "remaining": 0.025,
    "status": "open",
    "trades": [],
    "fees": []
  },
  {
    "id": "3235803335",
    "clientOrderId": "x-xcKtGhcu38390bc18aa54d72be7b44",
    "timestamp": 1665522363762,
    "datetime": "2022-10-11T21:06:03.762Z",
    "symbol": "BTC/USDT",
    "type": "stop",
    "timeInForce": "GTE_GTC",
    "postOnly": false,
    "reduceOnly": true,
    "side": "sell",
    "price": 19000,
    "stopPrice": 19000,
    "amount": 0.05,
    "cost": 0,
    "filled": 0,
    "remaining": 0.05,
    "status": "open",
    "trades": [],
    "fees": []
  }
]

Response Example (422)

{
  "errors": [
    {
      "value": "20000",
      "msg": "must not use with type traililng stop",
      "param": "stopTriggerPrice",
      "location": "body"
    },
    {
      "value": "LIMIT",
      "msg": "must require stopPrice with type limit",
      "param": "stopTriggerType",
      "location": "body"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API authorization failed (1103)"
}
{
  "error": "exchange API key type is invalid (1106)"
}
{
  "error": "exchange API key type is unsupported (1115)"
}
{
  "error": "invalid exchange symbol (1300)"
}

API Invoke Function

ExchangeExpressJSv1

HTTP Request

POST /v1/priv/exchange/order/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to create a new order.

Request Body

Content-Type

application/json

Parameter Type Required Description
symbol String Yes Exchange symbol. eg. BTC/USDT
type String Yes Order trade type. [LIMIT, MARKET, TRAILING_STOP]
side String Yes Exchange API Key trade type FUTURES support both [BUY, SELL], SPOT only supports BUY.
price Number Yes/No Order price. It is required with the type LIMIT, TRAILING_STOP.
amount Number Yes Order amount.
takeProfitPrices Number[] No Order LIMIT take profit prices. Max length of 25 and can't be used with the type TRAILING_STOP. eg. [1234, 1235, 1236]
stopTriggerPrice Number No Stoploss trigger price. Can't be used with the type TRAILING_STOP.
stopTriggerType String Yes/No Stoploss trigger price type. [LIMIT, MARKET]
stopPrice Number Yes/No Required if stopTriggerType value is LIMIT.
callbackRate Number Yes/No Required with the type TRAILING_STOP. Min 0.1 to max 5 where 1 for 1%.
riskProfilePercent Number No Should be included if the amount is derived from the risk of equity percentage. 1 for 1%.

HTTP Response

Content-Type

application/json

Cancel Futures Position

This endpoint will cancel futures position with any open orders.

Request Example

{
  "symbol": "BTC/USDT"
}

Response Example (204)

Response Example (422)

{
  "errors": [
    {
      "value": "invaliduuid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API authorization failed (1103)"
}
{
  "error": "exchange API key type is invalid (1106)"
}
{
  "error": "invalid exchange symbol (1300)"
}

API Invoke Function

ExchangeExpressJSv1

HTTP Request

DELETE /v1/priv/exchange/position/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to cancel all opened orders.

Request Body

Content-Type

application/json

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

HTTP Response

Content-Type

application/json

Change Futures Leverage

Request Example

{
  "symbol": "BTC/USDT",
  "leverage": 10
}

Response Example (204)

Response Example (422)

{
  "errors": [
    {
      "value": "invaliduuid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API authorization failed (1103)"
}
{
  "error": "exchange API key type is invalid (1106)"
}
{
  "error": "invalid exchange symbol (1300)"
}
{
  "error": "exchange bad request (1500)"
}

API Invoke Function

ExchangeExpressJSv1

HTTP Request

PUT /v1/priv/exchange/order/<API_KEY_ID>/leverage

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to create a new order.

Request Body

Content-Type

application/json

Parameter Type Required Description
symbol String Yes Exchange symbol. eg. BTC/USDT
leverage Integer Yes Change leverage. Depending on the wallet balance, exceeding the limit will return error code 1500. [1-125]

HTTP Response

Content-Type

application/json

Change Futures Margin Type

Request Example

{
  "symbol": "BTC/USDT",
  "type": "CROSSED"
}

Response Example (204)

Response Example (422)

{
  "errors": [
    {
      "value": "invaliduuid",
      "msg": "must be UUID",
      "param": "id",
      "location": "params"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API authorization failed (1103)"
}
{
  "error": "exchange API key type is invalid (1106)"
}
{
  "error": "invalid exchange symbol (1300)"
}

API Invoke Function

ExchangeExpressJSv1

HTTP Request

PUT /v1/priv/exchange/order/<API_KEY_ID>/margin

Request URL

Parameter Type Required Description
API_KEY_ID String Yes API Key ID to create a new order.

Request Body

Content-Type

application/json

Parameter Type Required Description
symbol String Yes Exchange symbol. eg. BTC/USDT
type String Yes Change margin type. [ISOLATED, CROSSED]

HTTP Response

Content-Type

application/json

Strategy Automated

List Exchange Key Follows

This endpoint retrieves the exchange API key list of the following automated strategy.

Response Example (200)

{
  "items": [
    {
      "id": "6737fbf1-308e-44fc-9518-92df4036ab86",
      "active": true,
      "createdAt": "2022-09-09T01:57:36.304Z",
      "updatedAt": "2022-09-09T01:57:36.304Z",
      "StrategyAutomated": {
        "id": "b9f67eb2-1d6e-4a47-a735-d0d9039c9b08",
        "active": true,
        "exchangeId": "BINANCE",
        "symbol": "BTC/USDT"
      },
      "StrategyRiskProfile": {
        "id": "ab00673a-cd19-44d4-a7c4-05c63e309663",
        "percentage": 1.5
      }
    }
  ]
}

API Invoke Function

StrategyAutomatedExpressJSv1

HTTP Request

GET /v1/priv/strategy/follow/exchange/key/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes Trade type automated exchange API key ID.

HTTP Response

Content-Type

application/json

Parameter Type Description
id String STRATEGY_FOLLOW_ID.
active Boolean Follow status of automated strategy.
createdAt String First created datetime.
updatedAt String Last updated datetime.

StrategyAutomated

Parameter Type Description
id String STRATEGY_ID. Ref: List Strategy Automated
symbol String Strategy exchange symbol.

StrategyRiskProfile

Parameter Type Description
id String STRATEGY_PROFILE_ID. Ref: List Strategy Risk Profile

Create Exchange Key Follow

This endpoint adds the following automated strategy to the exchange API key. The user subscription must allow permission.

Request Example

{
  "strategyAutomatedId": "b9f67eb2-1d6e-4a47-a735-d0d9039c9b08",
  "strategyRiskProfileId": "ab00673a-cd19-44d4-a7c4-05c63e309663"
}

Response Example (200)

{
  "id": "6737fbf1-308e-44fc-9518-92df4036ab86",
  "active": true,
  "createdAt": "2022-09-09T01:57:36.304Z",
  "updatedAt": "2022-09-09T01:57:36.304Z",
  "StrategyAutomated": {
    "id": "b9f67eb2-1d6e-4a47-a735-d0d9039c9b08",
    "active": true,
    "exchangeId": "BINANCE",
    "symbol": "BTC/USDT"
  },
  "StrategyRiskProfile": {
    "id": "ab00673a-cd19-44d4-a7c4-05c63e309663",
    "percentage": 1.5
  }
}

Response Example (422)

{
  "errors": [
    {
      "value": "b184a167-b76d-40fa-82da-eeaf07f10e0d",
      "msg": "must be active strategy automated id",
      "param": "strategyAutomatedId",
      "location": "body"
    },
    {
      "value": "682e3707-5775-468e-b468-deca805bbeb4",
      "msg": "must be valid strategy risk profile id",
      "param": "strategyRiskProfileId",
      "location": "body"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API key is inactive (1110)"
}
{
  "error": "exchange id does not match (1206)"
}
{
  "error": "exchange symbol already exist (1309)"
}
{
  "error": "unauthorized subscription features (2103)"
}

API Invoke Function

StrategyAutomatedExpressJSv1

HTTP Request

POST /v1/priv/strategy/follow/exchange/key/<API_KEY_ID>

Request URL

Parameter Type Required Description
API_KEY_ID String Yes Exchange API Key must be active and tradeType is automated.

Request Body

Content-Type

application/json

Parameter Type Default Required Description
active Boolean true No Follow status of automated strategy.
strategyAutomatedId String - Yes Must be active, and API_KEY_ID exchangeId must match. Ref: List Strategy Automated
strategyRiskProfileId String - Yes STRATEGY_PROFILE_ID. Ref: List Strategy Risk Profile

HTTP Response

Content-Type

application/json

Update Strategy Follow

Request Example

{
  "active": true,
  "strategyAutomatedId": "b762dad3-b720-4ddd-a515-32ae48e39f94",
  "strategyRiskProfileId": "3dc38f3d-4b4e-43b3-a102-e250b7cd3551"
}

Response Example (200)

{
  "id": "6737fbf1-308e-44fc-9518-92df4036ab86",
  "active": true,
  "createdAt": "2022-09-09T01:57:36.304Z",
  "updatedAt": "2022-09-09T01:57:36.304Z",
  "StrategyAutomated": {
    "id": "b762dad3-b720-4ddd-a515-32ae48e39f94",
    "active": true,
    "exchangeId": "BINANCE",
    "symbol": "BTC/USDT"
  },
  "StrategyRiskProfile": {
    "id": "3dc38f3d-4b4e-43b3-a102-e250b7cd3551",
    "percentage": 2
  }
}

Response Example (422)

{
  "errors": [
    {
      "value": "b184a167-b76d-40fa-82da-eeaf07f10e0d",
      "msg": "must be active strategy automated id",
      "param": "strategyAutomatedId",
      "location": "body"
    },
    {
      "value": "682e3707-5775-468e-b468-deca805bbeb4",
      "msg": "must be valid strategy risk profile id",
      "param": "strategyRiskProfileId",
      "location": "body"
    }
  ]
}

Response Example (433)

{
  "error": "exchange API key is inactive (1110)"
}
{
  "error": "exchange id does not match (1206)"
}
{
  "error": "exchange symbol does not match (1306)"
}

API Invoke Function

StrategyAutomatedExpressJSv1

HTTP Request

PUT /v1/priv/strategy/follow/<STRATEGY_FOLLOW_ID>

Request URL

Parameter Type Required Description
STRATEGY_FOLLOW_ID String Yes Id to update the strategy follow.

Request Body

Content-Type

application/json

Parameter Type Required Description
active Boolean No Follow status of automated strategy. If true exchange API key status must be active and AUTHORIZED.
strategyAutomatedId String No Must be active, and previous exchangeId and symbol must match. Ref: List Strategy Automated
strategyRiskProfileId String No STRATEGY_PROFILE_ID. Ref: List Strategy Risk Profile

HTTP Response

Content-Type

application/json

Contact Support <>

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.
433 Unprocessable -- Your request is valid, but it could not process due to external validations.
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.