mudawyl-user-api-doc.pages.dev Open in urlscan Pro
172.66.44.242  Public Scan

URL: https://mudawyl-user-api-doc.pages.dev/
Submission: On July 04 via automatic, source certstream-suspicious — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

NAV
 * Introduction
 * Recent Changes
   * Oct 30, 2022
   * Oct 15, 2022
 * Authentication
 * ReCaptcha
 * Public Data
   * Get Exchange Ticker
   * List Subscriptions Plans
   * List Strategy Risk Profile
   * List Strategy Automated
   * List Strategy History
   * Get Strategy Performance
 * Account Profile
   * Get User Profile
   * Put User Profile
 * Account Exchange
   * List Whitelist IP address
   * Get Exchange Total Balance
 * Account Exchange Key
   * List Exchange Keys
   * Create Exchange Key
   * Update Exchange Key
   * Delete Exchange Key
   * Get Exchange Key Balance
   * List Exchange Key Balance History
 * Account Notification
   * Get Alert Method
   * Get Notification Settings
   * Put Notification Settings
 * Account Subscription
   * Get User Subscription
 * Account Subscription Stripe
   * Get Stripe Subscription
   * Create Stripe Subscription Checkout
   * Update Stripe Subscription
   * List Stripe Billing History
 * Account Trade History
   * List Strategy Automated History
   * List Manual Trading History
 * Exchange Order
   * List Open Orders
   * List Order History
   * List Trade History
   * Get Futures Open Position
 * Exchange Order Execute
   * Create Manual Order
   * Cancel Futures Position
   * Change Futures Leverage
   * Change Futures Margin Type
 * Strategy Automated
   * List Exchange Key Follows
   * Create Exchange Key Follow
   * Update Strategy Follow
 * Contact Support <>
 * Errors


INTRODUCTION

Welcome to the developer API documentation.


RECENT CHANGES


OCT 30, 2022

 * Deprecated Exchange Cancel All Open Orders until SPOT order type is
   implemented.


OCT 15, 2022

 * Deprecated Exchange Cancel Open Order.


AUTHENTICATION

Refer to Amplify config file aws-exports.js

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


RECAPTCHA

Will only apply to PRODUCTION.

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)

Copy to Clipboard{
  "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)

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


> Response Example (433)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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

Response data can be NULL.

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

Copy to Clipboard{
  "language": "AR"
}


> Response Example (200)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard[
  "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)

Copy to Clipboard{
  "USD": 12345.12
}



API INVOKE FUNCTION

AccountExchangeExpressJSv1


HTTP REQUEST

GET /v1/priv/account/exchange/balance


HTTP RESPONSE

CONTENT-TYPE

application/json

It is not real-time data.

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


ACCOUNT EXCHANGE KEY


LIST EXCHANGE KEYS

> Response Example (200)

Copy to Clipboard{
  "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

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


> Response Example (200)

Copy to Clipboard{
  "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)

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


> Response Example (433)

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


Copy to Clipboard{
  "error": "exchange API key already exist (1109)"
}


Copy to Clipboard{
  "error": "exceed subscription max API key limit (2129a)"
}


Copy to Clipboard{
  "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

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


> Response Example (200)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "message": "route not found"
}


> Response Example (422)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "message": "route not found"
}


> Response Example (422)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "message": "route not found"
}


> Response Example (422)

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


> Response Example (433)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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

It is not real-time data.

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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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

Response data can be NULL.

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

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


> Response Example (200)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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

Stripe customers must have one active subscription at a time.


GET STRIPE SUBSCRIPTION

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

Amount is in cents.

> Response Example (200)

Copy to Clipboard{
  "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

Response data can be NULL.

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)

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


> Response Example (422)

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


> Response Example (433)

Copy to Clipboard{
  "error": "invalid subscription type (2100)"
}


Copy to Clipboard{
  "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.

Amount is in cents.

> Request Example

Copy to Clipboard{
  "cancelAtPeriodEnd": true
}


> Response Example (200)

Copy to Clipboard{
  "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)

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


> Response Example (433)

Copy to Clipboard{
  "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.

Amount is in cents.

> Response Example (200)

Copy to Clipboard[
  {
    "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard[
  {
    "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)

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


> Response Example (433)

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


Copy to Clipboard{
  "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)

Copy to Clipboard[
  {
    "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)

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


> Response Example (433)

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


Copy to Clipboard{
  "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)

Copy to Clipboard[
  {
    "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)

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


> Response Example (433)

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


Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

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


> Response Example (433)

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


Copy to Clipboard{
  "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

Response data can be NULL.


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

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


> Response Example (200)

Copy to Clipboard[
  {
    "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)

Copy to Clipboard{
  "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)

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


Copy to Clipboard{
  "error": "exchange API key type is invalid (1106)"
}


Copy to Clipboard{
  "error": "exchange API key type is unsupported (1115)"
}


Copy to Clipboard{
  "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

Copy to Clipboard{
  "symbol": "BTC/USDT"
}


> Response Example (204)
> 
> Response Example (422)

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


> Response Example (433)

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


Copy to Clipboard{
  "error": "exchange API key type is invalid (1106)"
}


Copy to Clipboard{
  "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

Success Status 204 will response with no content.


CHANGE FUTURES LEVERAGE

> Request Example

Copy to Clipboard{
  "symbol": "BTC/USDT",
  "leverage": 10
}


> Response Example (204)
> 
> Response Example (422)

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


> Response Example (433)

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


Copy to Clipboard{
  "error": "exchange API key type is invalid (1106)"
}


Copy to Clipboard{
  "error": "invalid exchange symbol (1300)"
}


Copy to Clipboard{
  "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

Success Status 204 will response with no content.


CHANGE FUTURES MARGIN TYPE

> Request Example

Copy to Clipboard{
  "symbol": "BTC/USDT",
  "type": "CROSSED"
}


> Response Example (204)
> 
> Response Example (422)

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


> Response Example (433)

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


Copy to Clipboard{
  "error": "exchange API key type is invalid (1106)"
}


Copy to Clipboard{
  "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

Success Status 204 will response with no content.


STRATEGY AUTOMATED


LIST EXCHANGE KEY FOLLOWS

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

> Response Example (200)

Copy to Clipboard{
  "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

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


> Response Example (200)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "error": "exchange API key is inactive (1110)"
}


Copy to Clipboard{
  "error": "exchange id does not match (1206)"
}


Copy to Clipboard{
  "error": "exchange symbol already exist (1309)"
}


Copy to Clipboard{
  "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

Symbol of strategyAutomatedId must not already exist, and the exchangeId must be
the same.

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

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


> Response Example (200)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "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)

Copy to Clipboard{
  "error": "exchange API key is inactive (1110)"
}


Copy to Clipboard{
  "error": "exchange id does not match (1206)"
}


Copy to Clipboard{
  "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.