Introduction
Welcome to the EQONEX Exchange developer site. The Eqonex Exchange offers clients the ability to connect to our platform via FIX, REST API or WebSocket. You can find sample code for each connectivity option on the Code Samples page.
What is an API?
An API is an acronym for Application Programming Interface. An API provides a means for one application to interact with another according to various programatic rules. The EQONEX developer documentation describes the rules by which your application can interact with the EQONEX exchange.
EQONEX supports a variety of popular Application Programming Interfaces:
- REST
- Web Sockets
- FIX Protocol
- ccxt library
If you would like to discuss which interface best suits your business requirements, please feel free to contact our API support team.
Using the EQONEX API?
The EQONEX Exchange API allows access to all the features of the EQONEX Exchange platform. Developers can leverage the API to build custom trading applications, or to connect an existing application with the EQONEX Exchange. By using our comprehensive suite of APIs you can:
- Instrument information on the products traded on the EQONEX Exchange
- Retrieve historical or stream live market data
- Submit and manage orders
- Retrieve Order History
- Retrieve Positions
- Check balances
- Automate Deposit and Withdrawal Requests
Generally every function which you might use via the GUI web application can be replicated through use of the API.
Support
Please refer to your account manager, or integration support for further information.
- Integration Support and technical onboarding please contact [email protected]
- API support, errors or omissions in this document [email protected]
Terms of Service
By accessing or using any EQONEX public or private API endpoint you have agreed to be bound by the EQONEX API Terms of Service. Usage of, or interaction with any product or service offered by EQONEX, whether by API or any other method of access is bound by the EQONEX Terms and Conditions and Business Rules of EQONEX. References in this API to “EQONEX”, “we”, “our”, or “us”, are to Eqonex Capital Pte. Ltd. (company number 201827813E) and the Diginex Group depending on the services being discussed.
API Keys
All API keys are used at your own risk and expense. EQONEX will not be held responsible for any error, malfunction, negligence, compromised security, cyber attack, or other force majeure affecting this platform. Users of the API will indemnify and hold harmless, the EQONEX Group, its Affiliates, and affiliated and other group companies from all damages losses and claims associate with the usage of this API and trading system.
Code Samples
To facilitate clients' integration to use the API to develop trading bots or applications to trade on EQONEX, we have now released some code samples on Gitlab.
For more information, please visit https://gitlab.com/eqonex-ideas-forum/eqonex-api-clients
The Sample Code provided by EQONEX is provided on an “as is” basis and any express or implied warranties, including the implied warranties of merchantability and fitness for a particular purpose are disclaimed. EQONEX does not make any warranties about the completeness, reliability and accuracy of the Sample Code. Any action you take in connection with the Sample Code is strictly at your own risk and EQONEX, its group companies and their employees, staff, directors or agents ("EQONEX Parties"), will not be liable for any losses and damages arising out of your use of Sample Code.
In no event shall any EQONEX Party be liable for any direct, indirect, incidental, special, exemplary, or consequential loss or damage (including but not limited to business interruption, procurement of substitute goods or services, loss of use, loss of data, or loss of profits) sustained by you or a third party, however caused and on any theory or liability, whether in contract, negligence, strict liability, or tort arising in any way out of the use of this Sample Code, even if an EQONEX Party has knowledge of the possibility of such losses or damage.
ccxt
EQONEX's REST API is now supported by CCXT. For more information, please visit https://ccxt.trade/.
What is CCXT?
CCXT is an open source library, that provides a normalised interface to trade on more than 100 cryptocurrency exchanges.
This provides quick access to market data for storage, analysis, visualization, indicator development, algorithmic trading, strategy backtesting, bot programming, and related software engineering. It is intended to be used by coders, developers, technically-skilled traders, data-scientists and financial analysts for building trading algorithms.
Current feature list:
- support for many cryptocurrency exchanges
- fully implemented public and private APIs
- optional normalized data for cross-exchange analytics and arbitrage
- an out of the box unified API that is extremely easy to integrate
- works in Node 7.6+, Python 3, PHP 5.4+, and web browsers
To get started, visit CCXT's GitHub page (https://github.com/ccxt/ccxt/) and check out EQONEX’s integrations in either:
- Python: https://github.com/ccxt/ccxt/tree/master/python
- Javascript: https://github.com/ccxt/ccxt/tree/master/js
- PHP: https://github.com/ccxt/ccxt/tree/master/php
Rate Limits
Our API endpoints are rate limited.
A 429 error code will be returned if you reach the request limit.
The default rate limit per each user is as follows:
Rate Limit Tier | Light Call (per minute) | Heavy Call (per minute) |
---|---|---|
Default | 900 | 50 |
Heavy Call
The following private endpoints are heavy calls.
https://eqonex.com/api/userTrades
https://eqonex.com/api/getOrders
https://eqonex.com/api/getOrderStatus
https://eqonex.com/api/getOrderHistory
Increase Your Rate Limt
If you are running up against our limits and believe that you have a legitimate need, please contact [email protected] to discuss upgrading your Rate Limit tier.
FIX Protocol
FIX has no rate limit.
Authentication
A registered user should have API access to EQONEX via FIX, REST, and WebSocket. Please refer to this help article on how to obtain your credentials for API access:
- API Username
- API Password
- SenderCompID (specific for FIX connectivity)
Once you have completed this step, you can follow the authentication steps as in the respective section for FIX, REST, and WebSocket.
REST API Overview
Overview
The REST API has endpoints for
- Public market data access
- Account management
- Order management
Data fields use enums defined in the FIX 4.4 standard, unless otherwise specified.
Note: As part of the EQONEX rebrand, the API can now be accessible via eqonex.com domain. All clients should target eqonex.com domain for all activities. All documentation below will now discuss endpoints under the domain of eqonex.com.
REST Public Endpoints
These endpoints are for retrieving market data snapshots.
For real-time updates, we advise using our public websocket channels instead of polling these endpoints.
See Rate Limit section for request limits.
Get Instruments
Returns a list of available currencies for trading.
HTTPS Request
Request
curl "https://eqonex.com/api/getInstruments"
import requests
import json
r = requests.get("https://eqonex.com/api/getInstruments")
print(json.dumps(r.json(),indent=4))
Response
{
"instruments":[
[3,"BTC",2,6,1,0,"BTC",true,0.2,0,0],
[450,"EQO",4,6,1,0,"EQO",true,1,0,0],
[2,"ETH",2,6,1,0,"ETH",true,1,0,0],
[1,"USDC",2,6,1,0,"USDC",true,0,0.00024000000000000003,0],
[11,"BCH",2,6,1,0,"BCH",true,1,0,0],
[508,"DOT",4,6,1,0,"DOT",true,1,0,0],
[507,"EQO Dollars",2,6,1,0,"EQO Dollars",true,0,0,0],
[503,"GRT",4,6,1,0,"GRT",true,1,0,0],
[501,"LINK",4,6,1,0,"LINK",true,1,0,0],
[505,"MATIC",4,6,1,0,"MATIC",true,1,0,0],
[4,"USDT",2,6,1,0,"USDT",true,1,0,0],
[511,"XLM",4,6,1,0,"XLM",true,1,0,0]
]
}
Environment | URL |
---|---|
Testnet | GET https://testnet.eqonex.com/api/getInstruments |
Production | GET https://eqonex.com/api/getInstruments |
Request Parameters
N/A
Response
Main Section
Field | Type | Description |
---|---|---|
instruments | list | See Instrument section for details |
Instrument Section (Comma Delimited)
Field | Type | Description |
---|---|---|
instrumentId | int | Exchange Instrument ID |
symbol | string | Exchange Symbol |
price_scale | int | Scale for converting integer price from EQONEX to decimal |
quantity_scale | int | Scale for converting integer quantity from EQONEX to decimal |
status | int | 1 = enabled for trading 0 = disabled for trading |
withdraw_fee | double | Withdrawal Fee |
name | string | Instrument Name |
withdrawal_pct | boolean | True - Withdrawal Fee specified as percentage False - Withdrawal Fee specified as USD value |
instrument_haircut | double | Instrument Haircut |
negative_balance_fee_rate | double | Negative Balance Fee Rate |
negative_balance_threshold | double | Negative Balance Threshold |
Get Instrument Pairs
Returns the static product reference data and trading status for all instruments listed on the EQONEX Exchange.
Security Status
When EQONEX lists a new Trading Pair or creates a new Derivative Contract, it will be added to the securities list
- One week prior to IssueDate<225> SecurityStatus<965> 10 = Published
- On the IssueDate<225> SecurityStatus<965> 1 = Active
- After MaturityDate<541> SecurityStatus<965> 4 = Expired
HTTPS Request
Request
curl "https://eqonex.com/api/getInstrumentPairs?verbose=true"
import requests
import json
r = requests.get("https://eqonex.com/api/getInstrumentPairs?verbose=true")
print(json.dumps(r.json(),indent=4))
Response
{
"instrumentPairs":[
{
"instrumentId":512,
"symbol":"XLM/USDC",
"quoteId":1,
"baseId":511,
"price_scale":4,
"quantity_scale":6,
"securityStatus":1,
"securityDesc":"XLM/USDC",
"assetType":"PAIR",
"currency":"XLM",
"contAmtCurr":"USDC",
"settlCurrency":"USDC",
"commCurrency":"USDC",
"cfiCode":"IFXXXP",
"securityExchange":"EQOS",
"micCode":"EQOC",
"instrumentPricePrecision":4,
"minPriceIncrement":1.0E-4,
"minPriceIncrementAmount":1.0,
"roundLot":1,
"minTradeVol":0.010000,
"maxTradeVol":0.000000,
"qtyType":0,
"contractMultiplier":1.0,
"auctionStartTime":0,
"auctionDuration":0,
"auctionFrequency":0,
"auctionPrice":0,
"auctionVolume":0,
"marketStatus":"OPEN"
},
{
"instrumentId":509,
"symbol":"DOT/USDC",
"quoteId":1,
"baseId":508,
"price_scale":4,
"quantity_scale":6,
"securityStatus":1,
"securityDesc":"DOT/USDC",
"assetType":"PAIR",
"currency":"DOT",
"contAmtCurr":"USDC",
"settlCurrency":"USDC",
"commCurrency":"USDC",
"cfiCode":"IFXXXP",
"securityExchange":"EQOS",
"micCode":"EQOC",
"instrumentPricePrecision":4,
"minPriceIncrement":0.01,
"minPriceIncrementAmount":1.0,
"roundLot":1,
"minTradeVol":0.100000,
"maxTradeVol":0.000000,
"qtyType":0,
"contractMultiplier":1.0,
"auctionStartTime":0,
"auctionDuration":0,
"auctionFrequency":0,
"auctionPrice":0,
"auctionVolume":0,
"marketStatus":"OPEN"
},
........
]
}
Environment | URL |
---|---|
Testnet | GET https://testnet.eqonex.com/api/getInstrumentPairs |
Production | GET https://eqonex.com/api/getInstrumentPairs |
Request Parameters
Field | Required | Type | Description |
---|---|---|---|
verbose | false | string | true - returns field names |
Response
Main Section
Field | Type | Description |
---|---|---|
instrumentPairs | list | See Instrument Pair section for details |
Instrument Pair Section (Comma Delimited)
Field | Type | Example | Description |
---|---|---|---|
instrumentId | int | 135 | EQONEX Instrument ID |
symbol | string | BTC/USD | EQONEX Exchange Symbol |
quoteId | int | 1 | EQONEX Instrument ID for Quote Currency |
baseId | int | 3 | EQONEX Instrument ID for Base Currency |
price_scale | int | 2 | int to decimal conversion factor for Price |
quantity_scale | int | 6 | int to decimal conversion factor for quantity |
securityStatus | int | 1 | Trading Status of the instrument |
securityDesc | string | BTC/USD | Full description of the instrument |
assetType | string | OPTION_PUT | Asset Type |
currency | string | BTC | Base (left hand) currency symbol |
contAmtCurr | string | USDC | Quote or Contract (right hand) currency symbol |
settleCurrency | string | USDC | Settlement currency symbol |
commCurrency | string | USDC | Commission Currency |
cfiCode | string | XXXXXX | CFI Code (ISO Classification of Financial Instruments) |
securityExchange | string | EQOS | Security Exchange Code |
micCode | string | XXXX | MIC Code (ISO Market Identification Code) |
instrumentPricePrecision | int | 2 | Specifies the number of decimal places for instrument prices |
minPriceIncrement | number | 1.0 | Minimum price increase for a given exchange-traded Instrument |
minPriceIncrementAmount | number | 1.0 | Minimum price increment amount associated with the MinPriceIncrement. For listed derivatives, the value can be calculated by multiplying MinPriceIncrement by contractMultiplier. |
roundLot | int | 1 | The trading lot size of a instrument |
minTradeVol | number | 1000 | Minimum trade volume |
maxTradeVol | number | 0 | Maximum trade volume |
qtyType | int | 0 | Type of quantity specified in a quantity field 0 = Currency or notional value 1 = Contracts |
contractMultiplier | number | 1.0 | Specifies the ratio or multiply factor to convert from contracts to shares (e.g. 1.0, 100, 1000, etc) |
*auctionStartTime | int | 0 | Auction start time |
*auctionDuration | int | 0 | Auction Duration |
*auctionFrequency | int | 0 | Auction Frequency in a day |
*auctionPrice | number | 1.0 | Auction Price |
*auctionVolume | number | 1.0 | Auction Volume |
marketStatus | string | OPEN | Market Status of the instrument |
**underlyingSymbol | string | BTC/USDC | Underlying Instrument for Futures and Options |
**underlyingSecurityID | int | 52 | EQONEX Instrument ID |
**underlyingSecurityIDSource | string | M | EQONEX Instrument ID Source type = M |
**underlyingSecurityExchange | string | XXXX | MIC Code of the underlying instrument |
**issueDate | int | 1598608087000 | Date/time on which the derivative becomes active for trading |
***maturityDate | string | 2022-06-24 | Maturity Date of the derivative |
***maturityTime | string | 2022-06-24T08:00:00Z | Maturity Date and time of the derivative |
***contractExpireTime | int | 1656057600000 | Contract expiry time of the derivative |
✶ fields applicable to Option
✶✶ fields applicable to Perp, Future and Option
✶✶✶ fields applicable to Future and Option
Get Orderbook
Returns a snapshot of the orderbook for the specified instrument pair.
This endpoint is rate limited (50 calls per minute). Polling is discouraged in favor of connecting via the orderbook websocket stream.
HTTPS Request
Request
curl "https://eqonex.com/api/getOrderBook?pairId=52"
import requests
import json
r = requests.get("https://eqonex.com/api/getOrderBook?pairId=52")
print(json.dumps(r.json(),indent=4))
Response
{
"bids": [
[
1131294,
265000,
1596508725841
],
[
1130841,
6366000,
1596508725841
],
...
]
"asks": [
[
1132010,
2400000,
1596508725841
],
[
1132426,
264000,
1596508725841
],
...
]
"usdMark": 11323.74,
"marketStatus": 0,
"estFundingRate": 0.0,
"fundingRateTime": 0,
"auctionPrice": 0.0,
"auctionVolume": 0.0
}
Environment | URL |
---|---|
Testnet | GET https://testnet.eqonex.com/api/getOrderBook |
Production | GET https://eqonex.com/api/getOrderBook |
Request Parameters
Field | Required | Type | Description |
---|---|---|---|
pairId | true | int | EQONEX Instrument PairId |
Response
Main Section
Field | Type | Description |
---|---|---|
bids | list | See Bids / Asks Section for details |
asks | list | See Bids / Asks Section for details |
usdMark | float | Current Mark Price in USD |
marketStatus | int | Market Status |
estFundingRate | float | Next Expected Basis Payment in USD |
fundingRateTime | int | Next Basis Payment Time UNIX Timestamp |
auctionPrice | float | Auction Price |
auctionVolume | float | Auction Volume |
Bids / Asks Section (Comma Delimited)
Field | Type | Description |
---|---|---|
price | int | Price level of order in the orderbook |
quantity | int | Cumulative quantity of orders at price level |
timestamp | int | Unix timestamp in milliseconds |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs.
Get Chart
Returns an array of chart data points in OHLC format for the specified instrument pair..
Polling is discouraged in favor of connecting via the chart websocket stream.
HTTPS Request
Environment | URL |
---|---|
Testnet | GET https://testnet.eqonex.com/api/getChart |
Production | GET https://eqonex.com/api/getChart |
Request Parameters
Request
curl "https://eqonex.com/api/getChart?pairId=52×pan=1&limit=10"
import requests
import json
r = requests.get("https://eqonex.com/api/getChart?pairId=52×pan=1&limit=10")
print(json.dumps(r.json(),indent=4))
Response
{
"pairId": 52,
"t": 1,
"s": "BTC/USDC",
"lastPx": 3893338,
"lastQty": 4000,
"o": 43174.80000000001,
"h": 43499.280000000006,
"l": 37698.740000000005,
"c": 38933.380000000005,
"v": 20076253.81716401,
"q": 500.7522000000002,
"chart": [
[
1642780380000,
3893123,
3893338,
3893123,
3893338,
0,
4673
],
[
1642780320000,
3893123,
3893123,
3893123,
3893123,
0,
4672
],
...
]
}
Main Section
Field | Required | Type | Description |
---|---|---|---|
pairId | true | int | EQONEX Instrument PairId |
timespan | true | int | Please refer to the timespan enum values |
limit | false | int | limit of results from the latest entry |
startDate | false | string | The beginning (earlier) date (yyyy-MM-dd) from which the records will be returned |
endDate | false | string | The ending (nearer) data and date (yyyy-MM-dd) to which the records will be return. Absence of the endTime parameter will return records from the startDate to present. |
Timespan Enum Values
Enum | Value |
---|---|
ONE_MINUTE | 1 |
FIVE_MINUTE | 2 |
FIFTEEN_MINUTE | 3 |
ONE_HOUR | 4 |
SIX_HOUR | 5 |
ONE_DAY | 6 |
ONE_WEEK | 7 |
Response
Main Section
Field | Type | Description |
---|---|---|
PairId | int | EQONEX Instrument PairId |
t | int | Timespan Enum of Chart Data |
s | string | EQONEX Symbol |
lastPx | int | Last Price |
lastQty | int | Last Quantity |
o | float | Open Price |
h | float | High Price |
l | float | Low Price |
c | float | Close Price |
v | float | Traded Volume |
q | float | Traded Quantity |
chart | list | See Chart section for details |
Chart Section (Comma Delimited)
Field | Type | Description |
---|---|---|
startTime | int | Start Time |
open | int | Open Price |
high | int | High Price |
low | int | Low Price |
close | int | Close Price |
volume | int | Traded Volume |
seqNumber | int | Sequence Number |
Open, high, low, close are integer numbers. To convert them to double, use the price_scale defined in getInstrumentPairs.
Get Trade History
Get most recent trades for the specified pair. Last 1000 trades (at maximun) within 30 days will be returned.
We discourage continuous polling for recent trades via this endpoint. For a more efficient and continuous poll of new trade history, please refer to the WebSocket Trade History channel.
HTTPS Request
Request
curl "https://eqonex.com/api/getTradeHistory?pairId=52"
import requests
import json
r = requests.get("https://eqonex.com/api/getTradeHistory?pairId=52")
print(json.dumps(r.json(),indent=4))
Response
{
"trades": [
[
1132030,
264000,
"20200804-02:39:44.495",
23998,
1
],
[
1135330,
264000,
"20200804-02:12:03.607",
23997,
2
],
...
]
}
Environment | URL |
---|---|
Testnet | GET https://testnet.eqonex.com/api/getTradeHistory |
Production | GET https://eqonex.com/api/getTradeHistory |
Request Parameters
Field | Required | Type | Description |
---|---|---|---|
pairId | true | int | EQONEX Instrument PairId |
Response
Main Section
Field | Type | Description |
---|---|---|
trades | list | See Trade section for details |
Trade Section (Comma Delimited)
Field | Type | Description |
---|---|---|
price | int | Price of the trade |
quantity | int | Quantity of the trade |
timestamp | string | Timestamp in a time format yyyyMMdd-HH:mm:ss.SSS |
sequenceNumber | int | * this is not an incremental sequence id unique to a specific instrumentId |
aggressorSide | int | 1 = Buy 2 = Sell |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs.
Get Funding Rate History
The basis funding rate is a fee paid by one side of the contract to the other (e.g. Longs pay Shorts or vice versa). Its purpose is to encourage the price of the perpetual futures contract to stay near the underlying spot index price.
This endpoint retuns the historical rates used to calculate these payments.
HTTPS Request
Environment | URL |
---|---|
Testnet | GET https://testnet.eqonex.com/api/getFundingRateHistory |
Production | GET https://eqonex.com/api/getFundingRateHistory |
Request Body
Request
{
"instrumentId":25,
"symbol":"BTC/USD[F]",
"limit":200,
"startTime":2021-11-29,
"endTime":2021-12-01
}
import requests
import json
params = {"limit":200,
}
r = requests.get("https://eqonex.com/api/getFundingRateHistory",params=params)
print(json.dumps(r.json(),indent=4))
Response
{
"id":28546,
"instrumentId":25,
"symbol":"BTC/USDC[F]",
"fundingRate":19.998507000000007,
"markPrice":57694.47000000001,
"settlCurrency":"USDC",
"periodicSettlementTime":"2021-11-30 20:00:00.927934"
}
Field | Required | Type | Description |
---|---|---|---|
instrumentId | false | int | Returns funding payments for the specified EQONEX Instrument ID If not specified all instruments are returned |
symbol | false | string | Returns funding payments for the specified EQONEX Symbol If not specified all instruments are returned |
limit | false | int | Specifies the number of records to be returned. If used, startTime and endTime filtering will be ignored |
startTime | false | string | The beginning date and time (yyyy-MM-dd) from which the records will be returned. |
endTime | false | string | The ending date and time (yyyy-MM-dd) to which the records will be returned. Date must be after startTime Absence of the endTime parameter will return records from the startTime to present. |
Response
Field | Type | Description |
---|---|---|
id | int | Report ID |
periodicSettlementTime | string | The Periodic Settlement time, against which the basis funding rate was calculated |
instrumentId | int | EQONEX Exchange instrument ID |
symbol | string | EQONEX Exchange Symbol |
fundingRate | float | Basis Funding Rate, an amount in the Settlement Currency, paid or received during periodic settlement |
markPrice | float | The instrument’s mark price at the periodic settlement time point. |
settlCurrency | string | The settlement currency of the fundingRate amount |
REST Private Endpoints
Private endpoints are available for order management, and account management. Every private request must be signed using the described authentication scheme.
Roles
EQONEX supports Role Based Access Control. When creating API Keys account administrators may restrict or delegate user access to the private endpoints. Please refer to documentation below to see what API key permissions are required for a specific route.
Trade
Allows a key to enter orders, as well as retrieve trade data. This includes POST /orders and several GET endpoints.
View
Allows a key read permissions. This includes all GET endpoints.
Logon
HTTPS Request
Request
{
"login":"[email protected]",
"password":"xxxxx"
}
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/logon |
Production | POST https://eqonex.com/api/logon |
API Permissions
This endpoint requires either the “view” or “trade” permission.
Retail Logon
Request Body (JSON)
Field | Required | Type | Description |
---|---|---|---|
login | true | string | Submitter's Logon |
password | true | string | Submitter's Password |
code | false | string | 2FA Code |
Response
Field | Type | Description |
---|---|---|
id | int | User ID |
requestToken | string | User's Request Token |
requestSecret | string | User's Request Secret |
uiThemeId | int | Theme ID |
Institutional Logon
Institutional users has 1 or more Exchange Account. The institutional logon flow helps institutional users to log into their multiple Exchange Accounts.
Assume an institutional user with the following information:
- User ID: 2705
- Exchange Account ID(s): 2703, 2704
The institutional user would need to log into 2705, 2703, and 2704 to place an order / get positions for his respective Exchange Account, via the following steps:
Step 1: Obtain Submitter Request Token and Request Secret
Request Body (JSON)
{
"login":"[email protected]",
"password":"xxxxx"
}
Field | Required | Type | Description |
---|---|---|---|
login | true | string | Submitter's Logon |
password | true | string | Submitter's Password |
code | false | string | 2FA Code |
Response
Response
{
"id":2705,
"requestToken":"AAAAAAAAAA",
"requestSecret":"aaaaaaaaaa"
}
Step 2: Obtain the request token and request secret for exchange account 2703
Request Body (JSON)
Request
{
"login":"[email protected]",
"password":"xxxxx",
"account":2703
}
Field | Required | Type | Description |
---|---|---|---|
login | true | string | Submitter's Logon |
password | true | string | Submitter's Password |
account | true | int | Exchange Account's User ID |
code | false | string | 2FA Code |
Response
Response
{
"id":2703,
"requestToken":"BBBBBBBBBB",
"requestSecret":"bbbbbbbbbb"
}
With the above 2 steps, 2 pairs of { requestToken, request } are returned:
- The { requestToken, requestSecret } for Submitter (Step 1): This is used for order management operation such as placing / amend / canceling orders.
- The { requestToken, requestSecret } for Account (Step 2): This is used for querying order and position under the Exchange Account.
The corresponding { requestToken, requestSecret } shall be used for signing message under order management vs querying order and position. Please see their respective section in this document for details.
Main Section (Account)
Field | Type | Description |
---|---|---|
id | int | Exchange Account ID |
requestToken | string | Exchange Account's Request Token |
requestSecret | string | Exchange Account's Request Secret |
Signing REST API Calls
function sign(requestSecret, requestBodyJSON) {
return CryptoJS.HmacSHA384(JSON.stringify(requestBodyJSON), requestSecret);
}
// Valid Example of requestBodyJSON (no formatting)
{"userId":1045725,"instrumentId":5,"side":1,"ordType":2,"symbol":"SPY/USD","quantity":125,"quantity_scale":2,"price":245,"price_scale":2}
// Invalid Example of requestBodyJSON (due to formatting)
{
"userId": 1045725,
"instrumentId": 5,
"side": 1,
"ordType": 2,
"symbol": "SPY/USD",
"quantity": 125,
"quantity_scale": 2,
"price": 245,
"price_scale": 2
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"key":value} # dict
requestbody = json.dumps(params, separators=(',', ':'))
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# http post request
r = requests.post(BASE_URL, data=requestbody, headers=requestheader)
All private REST requests should be signed based on the requestSecret obtained from a successful /logon. The requests should have the following structure using HTTP POST:
HTTP Header
Field | Required | Type | Description |
---|---|---|---|
requestToken | true | string | A successful /logon returns a pair of requestToken and requestSecret |
signature | true | string | sign(requestSecret, requestBodyJSON) |
Content-Type | false | string | application/json |
Request Body (JSON)
All request bodies should have content type application/json and be valid JSON without formatting. See example for details.
New Order
Place a new order.
Data fields use enums defined in the FIX 4.4 standard.
Orders can only be placed if your account has sufficient funds. Once an order is placed, your account funds will be put on hold for the duration of the order. How much and which funds are put on hold depends on the order type and parameters specified. See the Holds details below.
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
blockWaitAck=1 must be added to the order message to receive an Order ID from the matching engine.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/order |
Production | POST https://eqonex.com/api/order |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body
Request
{"userId":1045725,"instrumentId":52,"side":1,"ordType":2,"symbol":"BTC/USDC","quantity":125,"quantity_scale":2,"price":245,"price_scale":2}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":1045725,
"instrumentId":52,
"side":1,
"ordType":2,
"symbol":"BTC/USDC",
"quantity":125,
"quantity_scale":2,
"price":245,
"price_scale":2
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/order", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types. Depending on the order type, additional parameters will be required (see below). Open orders do not expire and will remain open until they are either filled or canceled.
Field | Required | Type | Description |
---|---|---|---|
id | false | int | ID of the request |
userId | true | int | User ID: aka Submitter for Institutional User. Please use its corresponding { requestToken, requestSecret } for signing the request |
account | false | int | true (for Institutional User) Account ID: The account which the position to be maintained |
instrumentId | true | int | Instrument ID |
symbol | true | String | Symbol of the instrument |
clOrdId | true | String | Unique client order ID |
side | true | int | Side of order: 1 = Buy 2 = Sell |
ordType | true | int | The following order types can be placed: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order limit |
price | true | int | Price per unit of quantity. Required for “Limit Order”” and “Stop Limit Order” ordType. |
price_scale | true | int | int to decimal conversion factor for price |
quantity | true | int | Order quantity |
quantity_scale | true | int | int to decimal conversion factor for quantity |
stopPx | false | int | (not required unless stop order) |
stopPx_scale | false | int | (not required unless stop order) |
timeInForce | false | int | (not required, defaults to 1 = Good Till Cancel (GTC), 3 = Immediate or Cancel (IOC), 4 = Fill or Kill (FOK), 8 = Post Only) (MKT orders only support IOC or FOK. Lack of TIF for MKT orders will default to IOC) |
blockWaitAck | false | int | 1 = wait for order acknowledgement. When set, response will include the matching engine "orderId" field |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Response
Response
{
"status": "sent",
"id": 0,
"instrumentId": 15,
"clOrdId": "1595329351003232854",
"userId": 2705,
"price": 0,
"quantity": 1357,
"ordType": 1
}
Field | Type | Description |
---|---|---|
status | string | Status = 'sent' means sending the request successfully |
id | int | orderId. blockWaitAck |
instrumentId | int | Instrument ID |
clOrdId | string | Unique client order ID |
userId | int | User ID |
price | int | Price per unit of quantity. |
quantity | int | Quanity |
ordType | int | The order type being submitted: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Cancel Order
Cancel a previously placed order.
Data fields use enums defined in the FIX 4.4 standard You can place two types of orders: limit and market. Orders can only be placed if your account has sufficient funds. Once an order is placed, your account funds will be put on hold for the duration of the order. How much and which funds are put on hold depends on the order type and parameters specified. See the Holds details below.
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/cancelOrder |
Production | POST https://eqonex.com/api/cancelOrder |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"instrumentId": "52",
"userId": "2707",
"origOrderId": 2877533546
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"instrumentId": "52",
"userId": "16989",
"clOrdId": "apitest_e123456"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/cancelOrder", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types. Depending on the order type, additional parameters will be required (see below). Open orders do not expire and will remain open until they are either filled or canceled.
REST API client can cancel an order either by order Id (inputted into origOrderId) or client order id (inputted into clOrdId).
We recommend client to listen to Websocket userorders channel or query getOrderStatus with the orderId to get a confirmation that the submitted order for cancelation is executed.
Field | Required | Type | Description |
---|---|---|---|
origOrderId | false | String | orderId. Either origOrderId or clOrdId must be specified |
clOrdId | false | String | Either origOrderId or clOrdId must be specified |
userId | true | int | User ID: aka Submitter for Institutional User. Please use its corresponding { requestToken, requestSecret } for signing the request |
account | false | int | If user is an institutional account user, this must be specified |
instrumentId | true | int |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Response
Response
{
"status": "sent",
"id": 0,
"origOrderId": 0,
"clOrdId":"apitest_e123456"
"instrumentId": 52,
"userId": 16989,
"price": 0,
"quantity": 0,
"ordType": 0
}
Field | Type | Description |
---|---|---|
status | string | 'sent' means requset has been sent successfully |
id | int | ID of the request |
origOrderId | int | Original Order ID |
clOrdId | string | Unique Client Order ID |
instrumentId | int | Instrument ID |
userId | int | User ID |
price | int | Price of the quantity |
quantity | int | Quantity |
ordType | int | Order Type |
Cancel All Orders
Cancel all open orders.
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/cancelAll |
Production | POST https://eqonex.com/api/cancelAll |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":"23754",
"account":"23750", //Required if institutional account
"instrumentId":"52"
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"23754",
"account":"23750", #Required if institutional account
"instrumentId":"52"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/cancelAll", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | User ID: aka Submitter for Institutional User. Please use its corresponding { requestToken, requestSecret } for signing the request |
account | false | int | Required for Institutional account |
instrumentId | false | int | Cancel all open orders for specified instrumentId |
Response
Field | Type | Description |
---|---|---|
status | string | 'sent' means requset has been sent successfully |
id | int | ID of the request |
origOrderId | int | Original Order ID |
instrumentId | int | Instrument ID |
userId | int | User ID |
price | int | Price of the quantity |
quantity | int | Quantity |
ordType | int | Order Type |
Response
{
"status": "sent",
"id": 0,
"origOrderId": 0,
"instrumentId": 52,
"userId": 23750,
"price": 0,
"quantity": 0,
"ordType": 0
}
Get Orders
Return a list of orders, ordered by id descending
Data fields use enums defined in the FIX 4.4 standard
All types or orders are returned with their statuses
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
This API call from v.5.5 would not return a reject. The reject order message will not be included.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getOrders |
Production | POST https://eqonex.com/api/getOrders |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":7966,
"limit":100
} // Request body: your uid as integer, limit as integer
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"7966",
"limit":"100"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getOrders", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types.
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | For institutional user, set this = account id |
account | false | int | For institutional user, set this = account id |
symbol | false | String | Cannot be used with instrumentId |
instrumentId | false | int | Cannot be used with symbol |
limit | false | int | |
ordStatus | false | string | Identifies status of order 0 = New 1 = Partially filled 2 = Filled 4 = Canceled C = Expired |
timestamp | false | long | If specified, all orders transacted at or after the timestamp in msec (GMT) will be shown. |
page | false | int | If specified, it returns orders on the discrete page (pagination). Each page consists of 1000 records at maximum. If the page is not mentioned, the first page will be the result. |
Response
Response
{
"isInitialSnap": False,
"orders": [
{
"orderId": 3650110526,
"orderUpdateSeq": 0,
"clOrdId": "testBid7",
"symbol": "BTC/USDC",
"instrumentId": 52,
"side": "1",
"userId": 7966,
"account": 7966,
"execType": "4",
"ordType": "2",
"ordStatus": "8",
"timeInForce": "1",
"timeStamp": "20210914-03:19:38.892",
"execId": 0,
"targetStrategy": 0,
"fee": 0,
"feeTotal": 0,
"fee_scale": 6,
"feeInstrumentId": 0,
"price": 4300056,
"price_scale": 2,
"stopPx": 0,
"stopPx_scale": 0,
"quantity": 1000,
"quantity_scale": 6,
"leavesQty": 0,
"leavesQty_scale": 6,
"cumQty": 0,
"cumQty_scale": 0,
"lastPx": 0,
"lastPx_scale": 2,
"avgPx": 0,
"avgPx_scale": 0,
"lastQty": 0,
"lastQty_scale": 6,
"price2": 0,
"price2_scale": 0,
"hidden": False,
"reduceOnly": False,
"liquidation": False
}
]
}
Main Section
Field | Type | Description |
---|---|---|
orders | [] | See Order section for details |
Order Section
Field | Type | Description |
---|---|---|
orderId | int | Unique order identifier assigned by the EQONEX matching engine. |
orderUpdateSeq | int | Order update sequence |
clOrdId | string | Client order ID |
symbol | string | Symbol of the instrument |
instrumentId | int | Instrument ID |
side | string | Side of order: 1 = Buy 2 = Sell |
userId | int | User ID |
account | int | Account ID |
execType | string | The execution report’s type: 0 = New 4 = Canceled 5 = Replace 8 = Rejected C = Expired F = Fill Status I = Order Status |
ordType | string | The order type being submitted or reported: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
ordStatus | string | Identifies status of order. 0 = New 1 = Partially filled 2 = Filled 4 = Canceled 8 = Rejected C = Expired |
timeInForce | string | Time in force |
timeStamp | string | Timestamp |
execId | int | Execution ID |
targetStrategy | int | Target Strategy |
fee | int | Fee |
feeTotal | int | Total fee |
fee_scale | int | Fee scale |
feeInstrumentId | int | Instrument id of fee |
price | int | Price per unit of quantity. Required for “Limit Order”” and “Stop Limit Order” ordType. |
price_scale | int | Price scale |
quantity | int | Quantity |
quantity_scale | int | Qunatity scale |
leavesQty | int | Leaves quantity |
leavesQty_scale | int | Leaves quantity scale |
cumQty | int | The cumulative quantity of an order, currently executed in a chain of partial fills. |
cumQty_scale | int | Same as quantity scale |
lastPx | int | Last price |
lastPx_scale | int | Last price scale |
avgPx | int | Average price |
avgPx_scale | int | Average price scale |
lastQty | int | Last quantity |
lastQty_scale | int | Last quantity scale |
price2 | int | price2 deprecated |
price2_scale | int | price2 scale deprecated |
hidden | bool | Hidden order deprecated |
reduceOnly | bool | Reduce Only deprecated |
liquidation | bool | An liquidation order |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Get Order Status
- /getOrder endpoint is deprecated, please use getOrderStatus.
Return an order with its status
Data fields use enums defined in the FIX 4.4 standard
All types or orders are returned with their statuses
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getOrderStatus |
Production | POST https://eqonex.com/api/getOrderStatus |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":3489,
"orderId":10959164717
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"23754",
"account":"23750", #Required if institutional account
"orderId":"10959164717"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getOrderStatus", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types.
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | For institutional user, set this = account id |
account | false | int | For institutional user, set this = account id |
orderId | true | int | Unique order identifier assigned by the EQONEX matching engine. |
Response
Reponse
{
"orderId": 10959164717,
"clOrdId": "1629964559332606823",
"symbol": "EQO/USDC",
"instrumentId": 452,
"side": "1",
"userId": 3489,
"account": 3489,
"execType": "F",
"ordType": "1",
"ordStatus": "2",
"timeInForce": "4",
"timeStamp": "20210826-07:55:59.334",
"execId": 89157704,
"targetStrategy": 0,
"isHidden": False,
"isReduceOnly": False,
"isLiquidation": False,
"fee": 0,
"fee_scale": 6,
"feeInstrumentId": 1,
"feeTotal": 0,
"price": 0,
"price_scale": 4,
"quantity": 1000000,
"quantity_scale": 6,
"leavesQty": 0,
"leavesQty_scale": 6,
"cumQty": 1000000,
"cumQty_scale": 6,
"lastPx": 6276,
"lastPx_scale": 4,
"avgPx": 6276,
"avgPx_scale": 4,
"lastQty": 1000000,
"lastQty_scale": 6
}
Field | Type | Description |
---|---|---|
orderId | int | Unique order identifier assigned by the EQONEX matching engine. |
orderUpdateSeq | int | Order update sequence |
clOrdId | string | Unique client order ID |
symbol | string | Symbol of instrument |
instrumentId | int | Instrument ID |
side | string | Side of order: 1 = Buy 2 = Sell |
userId | int | User ID |
execType | string | The execution report’s type: 0 = New 4 = Canceled 5 = Replace 8 = Rejected C = Expired F = Fill Status I = Order Status |
ordType | string | The order type being submitted or reported: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
ordStatus | string | Identifies status of order 0 = New 1 = Partially filled 2 = Filled 4 = Canceled 8 = Rejected C = Expired |
timeInForce | string | Time in force |
timeStamp | string | Timestamp of the order |
execId | int | Execution ID |
targetStrategy | int | Target strategy |
isHidden | bool | Hidden order deprecated. Always returns False |
isReduceOnly | bool | Reduce only order deprecated. Always returns False |
isLiquidation | bool | Is a liquation order |
fee | int | Fee |
feeTotal | int | Total fee |
fee_scale | int | Fee scale |
feeInstrumentId | int | Instrument ID of fee |
price | int | Price per unit of quantity. Required for “Limit Order”” and “Stop Limit Order” ordType. |
price_scale | int | Price scale |
quantity | int | Quantity |
quantity_scale | int | Quantity scale |
leavesQty | int | Leaves quantity |
leavesQty_scale | int | Leaves quantity scale |
cumQty | int | The cumulative quantity of an order, currently executed in a chain of partial fills. |
cumQty_scale | int | Cumulative quantity scale |
lastPx | int | Last price |
lastPx_scale | int | Last price scale |
lastQty | int | Last quantity |
lastQty_scale | int | Last quantity scale |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Get Open Orders
Return a list of open orders, ordered by id descending
Data fields use enums defined in the FIX 4.4 standard
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getOpenOrders |
Production | POST https://eqonex.com/api/getOpenOrders |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":3489,
"instrumentId":52
} // Request body: your uid as integer, instrumentId as integer
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"3489",
"instrumentId":"52"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getOpenOrders", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types.
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | |
account | false | int | For institutional user, set this = account id |
instrumentId | false | int |
Response
{
"orders": [
{
"orderId": 11014316050,
"orderUpdateSeq": 0,
"clOrdId": "1631595596845613799",
"symbol": "BTC/USDC",
"instrumentId": 52,
"side": "1",
"userId": 3489,
"account": 3489,
"execType": "0",
"ordType": "2",
"ordStatus": "0",
"timeInForce": "1",
"timeStamp": "20210914-04:59:56.846",
"execId": 0,
"targetStrategy": 0,
"fee": 0,
"feeTotal": 0,
"fee_scale": 0,
"feeInstrumentId": 0,
"price": 4507600,
"price_scale": 2,
"stopPx": 0,
"stopPx_scale": 0,
"quantity": 10000,
"quantity_scale": 6,
"leavesQty": 10000,
"leavesQty_scale": 6,
"cumQty": 0,
"cumQty_scale": 0,
"lastPx": 0,
"lastPx_scale": 2,
"avgPx": 0,
"avgPx_scale": 0,
"lastQty": 0,
"lastQty_scale": 6,
"price2": 0,
"price2_scale": 0,
"liquidation": False,
"hidden": False,
"reduceOnly": False
}
],
"isInitialSnap": False
}
Main Section
Field | Type | Description |
---|---|---|
orders | [] | See Order section for details |
Order Section
Field | Type | Description |
---|---|---|
orderId | int | Unique order identifier assigned by the EQONEX matching engine. |
orderUpdateSeq | int | Order update sequence |
clOrdId | string | Unique client order ID |
symbol | string | Symbol of instrument |
instrumentId | int | Instrument ID |
side | string | Side of order: 1 = Buy 2 = Sell |
userId | int | User ID |
account | int | Account ID |
execType | string | The execution report’s type: 0 = New 4 = Canceled 5 = Replace 8 = Rejected C = Expired F = Fill Status I = Order Status |
ordType | string | The order type being submitted or reported: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
ordStatus | string | Identifies status of order. 0 = New 1 = Partially filled 2 = Filled 4 = Canceled 8 = Rejected C = Expired |
timeInForce | string | Time in force |
timeStamp | string | Timestamp |
execId | int | Execution ID |
targetStrategy | int | Target strategy |
fee | int | Fee |
feeTotal | int | Total fee |
fee_scale | int | Fee scale |
feeInstrumentId | int | Instrument ID of fee |
price | int | Price per unit of quantity. Required for “Limit Order”” and “Stop Limit Order” ordType. |
price_scale | int | Price scale |
quantity | int | Quantity |
quantity_scale | int | Quantity scale |
leavesQty | int | Leaves quantity |
leavesQty_scale | int | Leaves quantity scale |
cumQty | int | The cumulative quantity of an order, currently executed in a chain of partial fills. |
cumQty_scale | int | Same as quantity scale |
lastPx | int | Last price |
lastPx_scale | int | Last price scale |
avgPx | int | Average price |
avgPx_scale | int | Average price scale |
lastQty | int | Last quantity |
lastQty_scale | int | Last quantity scale |
liquidation | bool | Liquation order |
hidden | bool | Hidden order deprecated. Always returns False |
reduceOnly | bool | Reduce only order deprecated. Always return False |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Get Order History
Return a list of orders history for a given orderid
Data fields use enums defined in the FIX 4.4 standard
All types or orders are returned with their statuses
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getOrderHistory |
Production | POST https://eqonex.com/api/getOrderHistory |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":3489,
"orderId":11014316050
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"3489",
"orderId":"11014316050"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getOrderHistory", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types.
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | For institutional user, set this = account id |
account | true | int | For institutional user, set this = account id |
orderId | true | int | Unique order identifier assigned by the EQONEX matching engine. |
Response
Response
{
"orders": [
{
"orderId": 11014316050,
"orderUpdateSeq": 0,
"clOrdId": "1631595596845613799",
"symbol": "BTC/USDC",
"instrumentId": 52,
"side": "1",
"userId": 3489,
"account": 3489,
"execType": "0",
"ordType": "2",
"ordStatus": "0",
"timeInForce": "1",
"timeStamp": "20210914-04:59:56.846",
"execId": 0,
"targetStrategy": 0,
"isHidden": False,
"isReduceOnly": False,
"isLiquidation": False,
"fee": 0,
"feeTotal": 0,
"fee_scale": 0,
"feeInstrumentId": 0,
"price": 4507600,
"price_scale": 2,
"quantity": 10000,
"quantity_scale": 6,
"leavesQty": 10000,
"leavesQty_scale": 6,
"cumQty": 0,
"cumQty_scale": 0,
"lastPx": 0,
"lastPx_scale": 2,
"avgPx": 0,
"avgPx_scale": 0,
"lastQty": 0,
"lastQty_scale": 6
},
{
"orderId": 11014316050,
"orderUpdateSeq": 1,
"clOrdId": "1631595596845613799",
"symbol": "BTC/USDC",
"instrumentId": 52,
"side": "1",
"userId": 3489,
"account": 3489,
"execType": "4",
"ordType": "2",
"ordStatus": "4",
"timeInForce": "1",
"timeStamp": "20210914-05:11:35.694",
"execId": 0,
"targetStrategy": 0,
"isHidden": False,
"isReduceOnly": False,
"isLiquidation": False,
"fee": 0,
"feeTotal": 0,
"fee_scale": 0,
"feeInstrumentId": 0,
"price": 4507600,
"price_scale": 2,
"quantity": 10000,
"quantity_scale": 6,
"leavesQty": 0,
"leavesQty_scale": 6,
"cumQty": 0,
"cumQty_scale": 6,
"lastPx": 0,
"lastPx_scale": 2,
"avgPx": 0,
"avgPx_scale": 2,
"lastQty": 0,
"lastQty_scale": 6
}
]
}
Main Section
Field | Type | Description |
---|---|---|
orders | [] | See Order section for details |
Order Section
Field | Type | Description |
---|---|---|
orderId | int | Unique order identifier assigned by the EQONEX matching engine. |
orderUpdateSeq | int | Order update sequence |
clOrdId | string | Client order ID |
symbol | string | Symbol of instrument |
instrumentId | int | Instrument ID |
side | string | Side of order: 1 = Buy 2 = Sell |
userId | int | User ID |
execType | string | The execution report’s type: 0 = New 4 = Canceled 5 = Replace 8 = Rejected C = Expired F = Fill Status I = Order Status |
ordType | string | The order type being submitted or reported: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
ordStatus | string | Order status |
timeInForce | string | Time in force |
timeStamp | string | Timestamp |
execId | int | Execution ID |
targetStrategy | int | Target Strategy |
isHidden | bool | Hidden order deprecated. Always returns False |
isReduceOnly | bool | Reduce order deprecated. Always returns False |
isLiquidation | bool | Liquidation order |
fee | int | Fee |
feeTotal | int | Total fee |
fee_scale | int | Fee scale |
feeInstrumentId | int | Instrument id of fee |
price | int | Price per unit of quantity. Required for “Limit Order”” and “Stop Limit Order” ordType. |
price_scale | int | Price scale |
quantity | int | Quantity |
quantity_scale | int | Quantity scale |
leavesQty | int | Leaves quantity |
leavesQty_scale | int | Leaves quantity scale |
cumQty | int | The cumulative quantity of an order, currently executed in a chain of partial fills. |
cumQty_scale | int | Same as quantity scale |
lastPx | int | Last price |
lastPx_scale | int | Last price scale |
lastQty | int | Last quantity |
lastQty_scale | int | Last quantity scale |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Get User Trade History
Return a list of trade history for a given userId
Data fields use enums defined in the FIX 4.4 standard
All trades are returned. ( Maximum of 10,000 records in descending order from order of creation or the Trades.) If more records are needed than 10,000 then need to split with use additional time parameters (startTime and endTime ) to have results < 10000, and multiple API calls to split will be needed.
e.g. startTime, endTime etc. as paginating and total returned records should be less than 10000.
Also, if Instrument Pair / security is provided, the trades for that Instrument Pair would be returned. In this case, maximum records are 1000. These 1000 records max are also in descending order of creation of the Trades. Parameter Page can be added in JSON request to navigate next pages subsequently in the order.
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute) An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/userTrades |
Production | POST https://eqonex.com/api/userTrades |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":"23715",
"account":"23750", //applicable only for institutional account
"instrumentId":"52",
"startTime":"1612242132260"
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"23715",
"instrumentId":"52",
"startTime":"1612242132260",
"endTime":"1612242132760"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/userTrades", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types.
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | User ID |
account | false | int | For institutional user, set this = account id |
instrumentId | false | int | If specified, all trades transacted for this instrument will be returned. If instrumentId id wrong, it will return all instrument / instrument pairs' trades |
startTime | false | long | If specified, all trades transacted at or after the timestamp in msec (GMT) will be shown. Used with endTime to filter to a specific period. |
endTime | false | long | If specified, all trades transacted at or before the timestamp in msec (GMT) will be shown. Used with startTime to filter to a specific period. |
timestamp | false | long | If specified, all trades transacted at or after the timestamp in msec (GMT) will be shown. Used when startTime and endTime are not used. If startTime and endTime mentioned, those will take precedence. |
page | false | int | If specified, it returns orders on the discrete page (pagination). Each page consists of 10000 records at maximum. If the page is not mentioned, the first page will be the result. |
limit | false | int | limit should be specified when the page field has been specified |
Response
Response
{
"trades": [
{
"account": 23750,
"commission": "-0.051214",
"commCurrency": "USDC",
"execId": 16761385,
"ordType": "2",
"ordStatus": "2",
"execType": "F",
"aggressorIndicator": true,
"orderId": 2877532158,
"price": "35619.28",
"qty": "0.001000",
"lastPx": "34143.19",
"avgPx": "34143.19",
"cumQty": "0.001000",
"quoteQty": "0.001000",
"side": "BUY",
"symbol": "BTC/USDC",
"clOrdId": "1612242132259520719",
"submitterId": 23715,
"targetStrategy": "0",
"time": 1612242132260,
"date": "20210202-05:02:12.260"
}
]
}
...
]
}
Main Section
Field | Type | Description |
---|---|---|
trades | [] | See Trade section for details |
Order Section
Field | Type | Description |
---|---|---|
account | int | Trading Account |
commission | decimal | Commission |
commCurrency | string | Commission Currency |
execId | int | Execution ID |
ordType | string | The order type being submitted or reported: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
ordStatus | string | Identifies status of order. 0 = New 1 = Partially filled 2 = Filled 3 = Done for Day 4 = Canceled 8 = Rejected C = Expired |
execType | string | The execution report’s type: 0 = New 4 = Canceled 5 = Replace 8 = Rejected C = Expired F = Fill Status I = Order Status S = Settlement |
aggressorIndicator | bool | Used to identify whether the order initiator is an aggressor or not in the trade. Y = Order initiator is aggressor N = Order initiator is passive |
orderId | string | Unique order identifier assigned by the EQONEX matching engine. |
price | decimal | Price per unit of quantity. Required for “Limit Order”” and “Stop Limit Order” ordType. |
qty | decimal | Order quantity |
lastPx | decimal | Price of this (last) fill. |
avgPx | decimal | Average execution price or 0.0 if not executed yet or rejected |
cumQty | decimal | The cumulative quantity of an order, currently executed in a chain of partial fills. |
quoteQty | decimal | Quote quantity |
side | string | Side of order: 1 = Buy 2 = Sell |
symbol | string | EQONEX exchange Symbol |
clOrdId | string | Client order ID |
submitterId | int | ID of the entering User |
targetStrategy | string | Target strategy |
time | long | Trade time |
date | string | Trade Date |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Get Positions
Return list of all positions / balances
Data fields use enums defined in the FIX 4.4 standard
All types or orders are returned with their statuses
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getPositions |
Production | POST https://eqonex.com/api/getPositions |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{"userId":3489} # Request body: your uid as integer
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"3489"}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getPositions", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types.
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | ID of the user |
account | false | int | Set this = your subaccount id |
Response
Response
{
"positions": [
{
"instrumentId": 1,
"userId": 3489,
"quantity": 63936243447,
"availableQuantity": 63936243447,
"quantity_scale": 6,
"symbol": "USDC",
"assetType": "ASSET",
"usdCostBasis": 0.0,
"usdAvgCostBasis": 0.0,
"usdValue": 63936.243,
"usdUnrealized": 0.0,
"usdRealized": 0.0,
"baseUsdMark": 1.0,
"settleCoinUsdMark": 0.0,
"settleCoinUnrealized": 0.0,
"settleCoinRealized": 0.0,
"tamContribution": 63936243447,
"spotOrderAdjustedQuantity": 63936243447
},
{
"instrumentId": 2,
"userId": 3489,
"quantity": 2000000,
"availableQuantity": 2000000,
"quantity_scale": 6,
"symbol": "ETH",
"assetType": "ASSET",
"usdCostBasis": 0.0,
"usdAvgCostBasis": 0.0,
"usdValue": 6657.06,
"usdUnrealized": 0.0,
"usdRealized": 0.0,
"baseUsdMark": 3328.53,
"settleCoinUsdMark": 0.0,
"settleCoinUnrealized": 0.0,
"settleCoinRealized": 0.0,
"tamContribution": 0,
"spotOrderAdjustedQuantity": 2000000
},
...
]
}
Main Section_
Field | Type | Description |
---|---|---|
positions | [] | See Position section for details |
Position Section
Field | Type | Description |
---|---|---|
instrumentId | int | Instrument ID |
userId | int | User ID |
quantity | int | Quantity |
availableQuantity | int | Available quantity |
availableTransferQuantity | int | Available transfer quantity |
quantity_scale | int | Quantity scale |
symbol | string | Symbol of instrument |
assetType | string | Asset type |
usdCostBasis | int | Cost basis in USD |
usdAvgCostBasis | int | Average cost basis in USD |
usdValue | double | Value in USD |
usdUnrealized | double | Unrealized USD |
usdRealized | double | Realized USD |
baseUsdMark | int | Base USD mark |
settleCoinUsdMark | int | Settle coin in USD mark |
settleCoinUnrealized | int | Settle coin in unrealizd USD |
settleCoinRealized | int | Settle coin in realized USD |
tamContribution | double | TAM contribution |
spotOrderAdjustedQuantity | double | Spot order adjusted quantity |
Quantity, availableQuantity are integer numbers. To convert them to double, use their respective scale defined in the response message.
Get User History
Provides historical report download for
- Orders
- Trades
- Positions
- Funding Payments
In csv or json format
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getUserHistory |
Production | POST https://eqonex.com/api/getUserHistory |
API Key Permissions
This endpoint requires the “trade” permission.
URL Parameters
Field | Required | Type | Description |
---|---|---|---|
instrumentId | false | int | filter by EQONEX Exchange instrument identifier |
limit | false | int | Specifies the number of records to be returned. 200 is the default value and 1000 is the maximum value per each request. If used, startTime and endTime filtering will be ignored |
startTime | false | long | If specified, all trades transacted at or after the timestamp in msec (GMT) will be shown. |
endTime | false | long | endTime is required to be specified if startTime is present |
format | true | string | Report format "csv" or "json" |
type | true | string | Report type "order" "trade" "position" "fundingPayment" |
Request Body
Field | Required | Type | Description |
---|---|---|---|
account | true | int | The exchange account id which is required for Institutional and retail accounts. |
Request
{{URL}}/getUserHistory?format=JSON&instrumentId=25&startTime=1611913406443&type=order
{
"account":"23750"
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"account":"23750"}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getUserHistory?format=JSON&instrumentId=25&startTime=1611913406443&type=order", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Response
orderHistory Report
Order History Response (JSON)
{
"instrumentId": 29,
"account": 6285,
"clOrdId": "1598317184238899164",
"symbol": "ETH/USD[F]",
"side": "BUY",
"ordType": "MARKET",
"execType": "TRADE",
"ordStatus": "FILLED",
"orderId": 3459746267,
"secondaryOrderId": 176613,
"execId": 15759356,
"secondaryExecId": 755,
"targetStrategy": 0,
"oderQty": 1000000,
"orderQty_scale": 6,
"leavesQty": 0,
"leavesQty_scale": 6,
"cumQty": 1000000,
"cumQty_scale": 6,
"getPrice": 0,
"price_scale": 2,
"avgPx": 49000,
"avgPx_scale": 2,
"lastPx": 49000,
"lastPx_scale": 2,
"lastQty": 1000000,
"lastQty_scale": 6,
"stopPx": 0,
"stopPx_scale": 0,
"timeInForce": "1",
"expireTime": 0,
"timestampMillis": 1598317184238,
"expireTimeMillis": 0,
"aggressorSide": "BUY",
"price2": 0,
"price2Scale": 0,
"sourceSeqNum": 97,
"sourceSendTime": 0,
"snapId": 0,
"kafkaRecordOffset": 43981771,
"transactionId": 1598317184238344975,
"isLastMessageInTransaction": false,
"timestamp": "20200825-00:59:44.238",
"feePositionQuantityChange": -0.19600000000000004,
"settlePositionQuantityChange": 0.0
},
Field | Type | Description |
---|---|---|
instrumentId | int | 29 |
account | int | 6285 |
clOrdId | string | 1598317184238899164 |
symbol | string | ETH/USD[F] |
side | Side of order: 1 = Buy 2 = Sell |
|
ordType | string | The order type being submitted or reported: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
execType | string | The execution report’s type: 0 = New 4 = Canceled 5 = Replace 8 = Rejected C = Expired F = Fill Status I = Order Status |
ordStatus | Identifies status of order. 0 = New 1 = Partially filled 2 = Filled 4 = Canceled 8 = Rejected C = Expired |
|
orderId | long | Unique order identifier assigned by the EQONEX matching engine. |
secondaryOrderId | 176613 | |
execId | 15759356 | |
secondaryExecId | 755 | |
targetStrategy | 0 | |
oderQty | 1000000 | |
orderQty_scale | 6 | |
leavesQty | 0 | |
leavesQty_scale | 6 | |
cumQty | The cumulative quantity of an order, currently executed in a chain of partial fills. | |
cumQty_scale | Same as quantity scale | |
getPrice | 0 | |
price_scale | 2 | |
avgPx | 49000 | |
avgPx_scale | 2 | |
lastPx | 49000 | |
lastPx_scale | 2 | |
lastQty | 1000000 | |
lastQty_scale | 6 | |
stopPx | 0 | |
stopPx_scale | 0 | |
timeInForce | 1 | |
expireTime | 0 | |
timestampMillis | 1598317184238 | |
expireTimeMillis | 0 | |
aggressorSide | BUY | |
price2 | 0 | |
price2Scale | 0 | |
sourceSeqNum | 97 | |
sourceSendTime | 0 | |
snapId | 0 | |
kafkaRecordOffset | 43981771 | |
transactionId | 1598317184238344975 | |
isLastMessageInTransaction | false | |
timestamp | 20200825-00:59:44.238 | |
feePositionQuantityChange | -0.19600000000000004 | |
settlePositionQuantityChange | 0.0 |
tradeHistory Report
Trade History Response (JSON)
{
"accountId": 6285,
"time": 20200825-00: 59: 44.238,
"symbol": "ETH/USD[F]",
"side": "BUY",
"price": "0.0",
"qty": "1.0",
"fee": "-0.19600000000000004",
"feeAsset": "USDC",
"ordType": "1",
"ordStatus": "2",
"execType": "F",
"maker": false,
"orderId": 3459746267,
"tradeId": 15759356,
"quoteQty": "1.0",
"realizedPnl": 0.0,
"clOrdId": "1598317184238899164",
"targetStrategy": "0",
"timeInForce": "1",
"expireTimeMillis": "0",
"leavesQty": "0.0",
"cumQty": "1.0",
"avgPx": "490.0",
"lastPx": "490.0",
"lastQty": "1.0",
"stopPx": "0.0",
"price2": "0.0"
}
Field | Type | Description |
---|---|---|
accountId | 6285 | |
time | 20200825-00: 59: 44.238 | |
symbol | ETH/USD[F] | |
side | BUY | |
price | Price per unit of quantity. Required for “Limit Order”” and “Stop Limit Order” ordType. | |
qty | 1.0 | |
fee | -0.19600000000000004" | |
feeAsset | USDC | |
ordType | string | The order type being submitted or reported: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
ordStatus | Identifies status of order. 0 = New 1 = Partially filled 2 = Filled 4 = Canceled 8 = Rejected C = Expired |
|
execType | string | The execution report’s type: 0 = New 4 = Canceled 5 = Replace 8 = Rejected C = Expired F = Fill Status I = Order Status |
maker | false | |
orderId | long | Unique order identifier assigned by the EQONEX matching engine. |
tradeId | 15759356 | |
quoteQty | 1.0 | |
realizedPnl | 0.0 | |
clOrdId | 1598317184238899164 | |
targetStrategy | 0 | |
timeInForce | 1 | |
expireTimeMillis | 0 | |
leavesQty | 0.0 | |
cumQty | int | The cumulative quantity of an order, currently executed in a chain of partial fills. |
avgPx | 490.0 | |
lastPx | 490.0 | |
lastQty | 1.0 | |
stopPx | 0.0 | |
price2 | 0.0 |
positionHistory Report
Field | Type | Description |
---|---|---|
postionHistory | ||
Account Summary | ||
reportid | 4498181 | |
created | 2020-08-25 03:30:01.562623 | |
userid | 6285 | |
usdvalue | 1.1671425446000001E8 | |
usdnotionalpositionvalue | 1573.96 | |
usdmaxexposurepositionandopenordersvalue | 1573.96 | |
usdopenordersrequiredvalue | 0.0 | |
usdmarginvalue | 0.0 | |
usdmarginrequiredvalue | 78.69 | |
usdmarginmaintvalue | 39.34 | |
leverageratio | 0.0 | |
usdunrealized | -116.03 | |
sourceseqnum | 0 | |
sourcesendtime | 0 | |
snapid | 0 | |
kafkarecordoffset | 0 | |
transactionid | 1598326201557031027, | |
islastmessageintransaction | false | |
decodedtime | 0 | |
matchtime | 0 | |
publishtime | 1598326201561 | |
txnType | 4020 | |
execId | 0 | |
orderId | Unique order identifier assigned by the EQONEX matching engine. | |
instrumentId1 | 1 | |
qty1 | 13865323105 | |
change1 | -4380465 | |
positions | ||
instrumentid | 53 | |
assettype | PAIR | |
quantity | 0 | |
quantityscale | 0 | |
availablequantity | 0 | |
availablequantityscale | 0 | |
usdcostbasis | 0 | |
usdcostbasisscale | 8 | |
usdavgcostbasis | 0 | |
usdavgcostbasisscale | 6 | |
usdvalue | 0.0 | |
usdunrealized | 0.0 | |
quotedusdmark | 233.14000000000001 | |
settlecoinusdmark | 0.0 | |
settlecoinunrealized | 0.0 | |
settlecoinrealized | 0.0 | |
bankruptpriceint | 0 |
Position History Report (JSON)
{
"fundingPaymentHistory": [
{
"reportid": 3788700,
"created": "2021-05-31 04:00:01.002801",
"userid": 5477,
"publishtime": 1622433601001,
"triggerTime": 1622433600977,
"instrumentId": 25,
"symbol": "BTC/USDC[F]",
"fundingRate": 128.76000000000002,
"settlCurrency": "USDC",
"qty1": 8919027014774,
"change1": -256232400
},
}
fundingPaymentHistory Report
Field | Type | Description |
---|---|---|
reportid | int | |
created | ||
userid | int | |
publishtime | ||
triggerTime | ||
instrumentId | int | |
symbol | string | |
fundingRate | ||
settlCurrency | string | USDC |
qty1 | int | USDC balance. Scale is 6. |
change1 | int | Funding payment received or paid. Positive as received, negative as paid. Scale is 6. |
Get Risk
Return real-time risk metrics
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getRisk |
Production | POST https://eqonex.com/api/getRisk |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{"userId":7966}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"7966"}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getRisk", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
These parameters are common to all order types.
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | ID of the user |
account | false | int | For institutional user, set this = account id |
Response
Response
{
"userId": 7966,
"usdValue": 7398245.37,
"usdPositionValue": 5863434.96,
"usdOpenOrdersValue": 0.0,
"usdOpenOrdersRequiredValue": 0.0,
"usdMarginValue": 0.0,
"usdMarginRequiredValue": 5863434.965279438,
"usdMarginMaintValue": 2931717.48,
"leverageRatio": 0.79,
"usdUnrealized": 40623.17,
"riskUpdateDate": "20210813-03:58:58.161",
"usdMarginableValue": 7335923.78,
"usdOpenOrdersNotional": 0.0,
"usdMarginReservedBuys": 0.0,
"usdMarginReservedSells": 0.0,
"usdMarginAvailable": 1472488.82,
"usdPositionsValue": 5863434.96,
"usdMarginReserve": 0.0,
"usdMarginInitial": 5863434.96,
"usdMarginTrigger": 2931717.48,
"usdMarginAccountTotal": 7335923.78,
"accountLeverage": 0.79
}
- NOTE: There are additional fields in response from this API endpoint than below. Those are legacy fields and could be ignored.
Field | Type | Description |
---|---|---|
userId | int | |
usdValue | double | Total USDC value of the account including unrealized P&L |
usdPositionValue | double | USDC notional of current position(s) |
usdOpenOrdersValue | double | Open Orders Value |
usdOpenOrdersRequiredValue | double | Open Orders Required Value |
usdMarginValue | double | Margin Value |
usdMarginRequiredValue | double | Margin Required Value |
usdMarginMaintValue | double | Margin Maintained Value |
leverageRatio | double | Leverage expressing Notional Position as multiple of Total Account Margin |
usdUnrealized | double | Unrealized Gain or Loss |
riskUpdateDate | string | Date and Time when the User Risk was last updated |
usdOpenOrdersNotional | double | Notional value of derivative product open orders |
usdMarginReservedBuys | double | The additional Initial Margin required if all open buy orders would be filled |
usdMarginReservedSells | double | The additional Initial Margin required if all open sell orders would be filled |
usdMarginAvailable | double | Margin available to place new orders |
usdMarginReserve | double | Reserved Margin for open orders, expressed as the maximum of usdMarginReservedBuys and usdMarginReservedSells |
usdMarginInitial | double | The Initial Margin required for open position(s) and open orders |
usdMarginTrigger | double | Minimum Total Account Margin required to prevent liquidation |
usdMarginAccountTotal | double | Sum of equivalent USDC notional of all assets available for margin including unrealized P&L, less any capital required for open spot orders |
accountLeverage | double | Account leverage expressing Notional Position as multiple of Total Account Margin |
Get Available Trading Quantity
Return available trading quantity.
Please note that this REST API is Rate limited. ( i.e. Call has a upper limit on number of call per minute). An error code, 429, will be returned if rate limit is reached.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getAvailableTradingQuantity |
Production | POST https://eqonex.com/api/getAvailableTradingQuantity |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":"23715",
"account":"23750",
"instrumentId":"52"
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"23715",
"account":"23750",
"instrumentId":"52"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getAvailableTradingQuantity", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | |
account | true | int | For institutional user, set this = account id |
symbol | false | string | |
instrumentId | false | int | one of instrumentId or symbol needs to be specified |
Response
Response
{
"instrumentId":52,
"symbol":"BTC/USDC",
"baseId":3,
"quoteId":1,
"availableTradingQuantityBase":0,
"availableTradingQuantityQuote":7416465,
"quantityScale":6,
"timestamp":1628131541992
}
Field | Type | Description |
---|---|---|
timestamp | string | Timestamp |
instrumentId | int | Instrument ID |
symbol | string | Symbol |
baseId | int | Base ID |
availableTradingQuantityBase | long | Available Trading Quantity Base |
quoteId | int | Quote ID |
availableTradingQuantityQuote | long | Available Trading Quantity Quote |
quantityScale | int | Quantity Scale |
REST Wallet Endpoints
Get Deposit Addresses
Return list of addresses for each coin
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getDepositAddresses |
Production | POST https://eqonex.com/api/getDepositAddresses |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":6214,
"account":"4245",
"instrumentId":3
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":6214,
"account":"4245",
"instrumentId":"3"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getDepositAddresses", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | User ID |
account | false | int | Required for institutional user |
instrumentId | true | int | Instrument ID |
Response
Response
{
"addresses": [
{
"instrumentId": 3,
"userId": 4245,
"symbol": "BTC",
"address": "AAAAAAAAAABBBBBBBCCCCCCCDDDDDDDEEEEEE",
"status": 1
}
]
}
Main Section
Field | Type | Description |
---|---|---|
addresses | [] | See Address section for details |
Address Section
Field | Type | Description |
---|---|---|
instrumentId | int | Instrument ID |
userId | int | User ID |
symbol | string | Symbol |
address | string | Deposit address |
status | int | Status |
Get Withdrawal Request
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getWithdrawRequests |
Production | POST https://eqonex.com/api/getWithdrawRequests |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{
"userId":6214,
"account":"4245"
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":6214,
"account":"4245"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getWithdrawRequests", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | User ID |
account | false | int | Required for institutional user |
Response
Response
{
"addresses":[
{
"id":3841,
"instrumentId":3,
"userId":4245,
"symbol":"BTC",
"address":"XXXXXYYYYYZZZZZ",
"timestamp":"20200806-11:04:35.053",
"status":0,
"balance":1,
"balance_scale":3,
"confirms":0,
"transactionId":"null"
}
]
}
Main Section
Field | Type | Description |
---|---|---|
addresses | [] | See Address section for details |
Address Section
Field | Type | Description |
---|---|---|
instrumentId | int | Instrument ID |
userId | int | User ID |
symbol | string | Symbol |
address | string | Address |
timestamp | string | Timestamp |
status | int | Status |
balance | int | Balance |
balance_scale | int | Balance Scale |
confirms | int | Confirms |
transactionId | string | Transaction ID |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
Send Withdraw Request
Request to send coins to an external address
This endpoint can only be used using the wallet request token and secret which can be found on EQONEX Web API section
REST API users are not able to withdraw using the wallet request credentials with the wallet 2FA toggle on. User must toggle wallet 2FA off in order to use this feature.
When toggle wallet 2FA is off, API user is able to withdraw crypto thru REST using the wallet API keys without the need of 2FA in the requestBody.
Generating new set of API keys will revert the state of 2FA required for withdrawals using wallet API credentials.
To send withdrawal request using this endpoint, User is required to disable the 2FA for the wallet request credentials.
Disabling 2FA for wallet API keys does not disable User's account 2FA.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/sendWithdrawRequest |
Production | POST https://eqonex.com/api/sendWithdrawRequest |
API Key Permissions
For Authorised Person account, this endpoint requires the “trade” permission to be granted with Withdraw toggle enabled.
Request Header
Parameters | Required | Description |
---|---|---|
walletRequestToken | Y | Wallet API token can be obtained from EQONEX GUI Profile -> Account -> API |
requesttoken | N | User must use walletRequestToken header for this endpoint |
signature | Y |
Request Body (JSON)
Request
{
"userId":"23754",
"account":"23750",
"instrumentId":"1", // eg.instrumentId = 1 is for USDC
"quantity":"100",
"quantity_scale":"0",
"address":"2MvW97yT6E2Kq8bWc1aj1DqfbgMzjRNk2LE"
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"23754",
"account":"23750",
"instrumentId":"1",
"quantity":"100",
"quantity_scale":"0",
"address":"2MvW97yT6E2Kq8bWc1aj1DqfbgMzjRNk2LE"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/sendWithdrawRequest", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | User ID |
account | false | int | Required for institutional user |
instrumentId | true | int | Refer to getInstruments eg. 1 for USDC |
quantity | true | int | Quantity |
quantity_scale | false | int | Quantity scale |
address | true | string | Address destination |
Response
Response
{
"instrumentId": 1,
"userId": 23750,
"symbol": "USDC",
"timestamp": "20200201-05:37:16.584",
"status": 1,
"userUuid": "b9e33713-c28f-468f-99bd-f6deab0dd854",
"currencyCode": "USDC",
"address": "2MvW97yT6E2Kq8bWc1aj1DqfbgMzjRNk2LE",
"quantity": 20,
"requestUuid": "56782b34-8a78-4f5f-b164-4b8f7d583b7f",
"transactionUuid": "1004eb0f-41e1-41e9-9d48-8eefcc6c09f2",
"transactionId": "WS23436",
"destinationWalletAlias": "Test",
"quantity_scale": 0
}
Main Section
Field | Type | Description |
---|---|---|
addresses | [] | See Address section for details |
Address Section
Field | Type | Description |
---|---|---|
instrumentId | int | Instrument ID |
userId | int | User ID |
symbol | string | Symbol |
address | string | Address |
timestamp | string | TimeStamp |
status | number | Status |
quantity | number | Quantity |
userUuid | string | User UUID |
requestUuid | string | Request UUID |
transactionUuid | string | Transaction UUID |
transactionId | string | Transaction ID |
destinationWalletAlias | string | Destination Wallet Alias |
quantity scale | number | Quantity Scale |
Send Transfer Request
Request to send coins between sub-accounts.
This endpoint can only be used using the wallet request token and secret which can be found on EQONEX Web API section. Please note that this endpoint is for RETAIL users only.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/sendTransferRequest |
Production | POST https://eqonex.com/api/sendTransferRequest |
API Key Permissions
This endpoint requires the “trade” permission to be granted with Withdraw toggle enabled.
Request Header
Parameters | Required | Description |
---|---|---|
walletRequestToken | Y | Wallet API token can be obtained from EQONEX GUI Profile -> Account -> API |
requesttoken | N | User must use walletRequestToken header for this endpoint |
signature | Y |
Request Body (JSON)
Request
{
"sourceAccount":2375,
"destinationAccount":34690,
"instrumentId":1,
"symbol":"USDC",
"quantity":20,
"quantity_scale":1
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"sourceAccount":"2375",
"destinationAccount":"34690",
"instrumentId":"1",
"symbol":"USDC",
"quantity":"20",
"quantity_scale":"1"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/sendTransferRequest", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Field | Required | Type | Description |
---|---|---|---|
sourceAccount | true | int | Source Account |
destinationAccount | true | int | Destination Account |
instrumentId | false | int | Refer to getInstruments eg. 1 for USDC |
symbol | false | string | User can make transfer request using symbol or instrumentId, or both of them |
quantity | true | int | Qunatity |
quantityScale | false | int | Quantity Scale |
Response
Response
{
"instrumentId": 1,
"sourceAccount": 23750,
"destinationAccount": 34690,
"symbol": "USDC",
"timestamp": "20200201-05:37:16.584",
"quantity": 20,
"quantityScale": 1,
"transactionId": "WS23436",
"transactionUuid": "1004eb0f-41e1-41e9-9d48-8eefcc6c09f2"
}
Main Section
Field | Type | Description |
---|---|---|
instrumentId | int | Instrument ID |
sourceAccount | int | Source Account |
destinationAccount | int | Destination Account |
symbol | string | Symbol |
timestamp | string | Timestamp |
quantity | int | Quantity |
quantity_scale | int | Quantity Scale |
transactionId | string | Transaction ID |
transactionUuid | string | Transaction UUID |
Get Transfer History
Returns historic deposits and withdrawals
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getTransferHistory |
Production | POST https://eqonex.com/api/getTransferHistory |
API Key Permissions
For Authorised Person account, this endpoint requires the “trade” permission to be granted with Withdraw toggle enabled.
Request Body (JSON)
Request
{
"userId":"23715",
"account":"23750",
"instrumentId":"1",
"transferType":"WITHDRAWAL"
}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"23715",
"account":"23750",
"instrumentId":"1",
"transferType":"WITHDRAWAL"
}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getTransferHistory", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | User ID |
account | false | int | Required for institutional user |
instrumentId | false | int | Refer to getInstruments |
transferType | false | string | DEPOSIT or WITHDRAWAL |
Response
Response
{
"transferHistory": [
{
"id": "WC22201",
"instrumentId": 3,
"userId": 23750,
"symbol": "BTC",
"transferType": "WITHDRAWAL",
"fromAddress": null,
"toAddress": {
"accountName": "",
"accountNumber": "",
"alias": "BTC 2",
"bankAddress": "",
"info": "2NBdGoVoYCBLC3nKn1E9V3H26KWfQjNSt7W",
"swiftCode": "N/A",
"routingNumber": "",
"bankContact": ""
}
}
]
}
Main Section
Field | Type | Description |
---|---|---|
transferHistory | [] | Refer to below |
requestBody
Field | Type | Description |
---|---|---|
id | string | |
instrumentId | int | Instrument ID |
userId | int | User ID |
symbol | string | Symbol |
transferType | string | Transfer Type |
fromAddress | object | information of sender |
toAddress | object | information of receiver |
timestamp | int | Timestamp |
updatedAt | int | Update at |
status | string | Status |
quantity | int | Quantity |
quantity_scale | int | Quantity Scale |
transactionId | string | transaction hash of transfer (crypto) |
netQuantity | int | Net Quantity |
netQuantity_scale | int | Net Quantity Scale |
confirms | int | Confirms |
balanace | int | Balance |
balance_change | int | Balance Change |
bankName | string | Bank Name |
address | string | Address |
internalId | string | Internal ID |
uuid | string | UUID |
fromAddress
Field | Type | Description |
---|---|---|
accountName | string | Account Name |
accountNumber | string | Account Number |
alias | string | Alias |
bankAddress | string | Bank Address |
info | string | Information |
swiftCode | string | Swift Code |
routingNumber | string | Routing Number |
bankContact | string | Bank Contact |
toAddress
Field | Type | Description |
---|---|---|
accountName | string | Account Name |
accountNumber | string | Account Number |
alias | string | Alias |
bankAddress | string | Bank Address |
info | string | Information |
swiftCode | string | Swift Code |
routingNumber | string | Routing Number |
bankContact | string | Bank Contact |
Get Deposit History
Returns a list of deposit history records.
HTTPS Request
Environment | URL |
---|---|
Testnet | POST https://testnet.eqonex.com/api/getDepositHistory |
Production | POST https://eqonex.com/api/getDepositHistory |
API Key Permissions
This endpoint requires the “trade” permission.
Request Body (JSON)
Request
{"userId":6214}
import hashlib
import hmac
import json
import requests
UID = uid # integer
API_KEY = "key" # string
SECRET_KEY = "secret" # string
def sign_api_request(api_secret, requestbody):
signature_hash = hmac.new(api_secret.encode(), requestbody.encode(), hashlib.sha384).hexdigest()
return signature_hash
# Request body
params = {"userId":"6214"}
requestbody = json.dumps(params)
# Request header
sig = sign_api_request(SECRET_KEY, requestbody)
requestheader = {"requestToken": API_KEY, "signature": sig}
# POST request
r = requests.post("https://eqonex.com/api/getDepositHistory", data=requestbody, headers=requestheader)
print(json.dumps(r.json(),indent=4)
Field | Required | Type | Description |
---|---|---|---|
userId | true | int | User ID |
account | false | int | Required for institutional user |
instrumentId | false | int | Instrument ID |
Response
Response
{
"deposits": [
{
"id": 1234,
"instrumentId": 1,
"userId": 6214,
"symbol": "USDC",
"address": "",
"timestamp": 1631684335008,
"status": 1,
"balance": 0.0,
"balance_change": 1.0,
"confirms": 1,
"transactionId": ""
}
]
}
Field | Type | Description |
---|---|---|
id | int | |
instrumentId | int | Instrument ID |
userId | int | User ID |
symbol | string | Symbol |
address | string | Address |
timestamp | int | Timestamp |
status | int | Status |
balance | double | Balance |
balance_change | double | Balance Change |
confirms | int | Confirms |
transactionId | string | Transaction ID |
WebSocket 1.1 Overview
Real-time market data updates provide the fastest insight into order flow and trades. This however means that you are responsible for reading the given message streams and using the messages to suit your needs. This can include building real-time order books or tracking real-time trades. The websocket feed is publicly available, but connections to the feed are rate-limited to one call per four seconds per IP address.
WSS1.1 Protocol Overview
The websocket 1.1 feed uses a bidirectional protocol, which encodes all messages as JSON objects. All messages have a type attribute that can be used to handle the message appropriately. Please note that new message types can be added at any point in time. Clients are expected to ignore messages they do not support.
Error messages: Most failure cases will cause an error message (a message with the type "error") to be emitted. This can be helpful for implementing a client or debugging issues.
While a websocket 1.1 connection is over TCP, the websocket servers receive market data in a manner which can result in dropped messages. Your feed consumer should either be designed to expect and handle sequence gaps and out-of-order messages, or use channels that guarantee delivery of messages.
Note: As part of the EQONEX rebrand, the API can now be accessible via eqonex.com domain. The equos.io domain will stay for the near future but we recommend all clients to adjust their connections to target eqonex.com domain for all activities.
All documentation below will now discuss endpoints under the domain of eqonex.com. Existing clients who target equos.io will still be able to connect but please make note of the above and make the domain switch as they see fit.
Subscribe
{"heartbeat":1000}
WSS1.1 Heartbeat / Websocket Ping Pong
To keep a WebSocket session alive, clients are required to send a 'heartbeat' message at least once every 30 seconds. Shorter timeframes are possible too. The '{"heartbeat": timestamp msec}' will return the same value received as a result.
WSS1.1 Subscribe
To begin receiving feed messages, clients must first send a subscribe message to the server indicating which channels and types they wish to receive. This message is mandatory. Clients will be disconnected from the feed if no subscribe message has been received within 5 seconds.
WSS1.1 Unsubscribe
To stop receiving feed messages, clients must first send an unsubscribe message to the server indicating which channels and types they wish to stop receiving.
WebSocket 1.1 Public Channels
WSS1.1 Session Management
Subscribe
In order to receive real-time messages, clients are expected to send a subscription message to the server indicating the data types the subscriber requires. If a subscription message is not received within x seconds (configurable at an API level) after creating a TCP connection, the connection will be dropped by the server. After the first subscription, subsequent subscriptions may be made without the time restriction.
Clients may subscribe to one or more types via a single subscription request. If the subscription for at least one type is unsuccessful, subscription for all types will be unsuccessful. Subscription for a type/symbol combination which is already subscribed to will be rejected.
Unsubscribe
To stop receiving real-time messages, a client can send an unsubscribe message to the server indicating the channels and data types that should be stopped. Unsubscribe requests will be checked to ensure there is an existing subscription, else will be rejected.
Maintaining a Session
In order to maintain the WebSocket session, clients are expected the send heartbeats every n seconds (configurable at an API level). In response, the server will echo back the message. If the server does not receive x (configurable at an API level) consecutive heartbeats from the client, the connection will be dropped by the server. The first subscription response will have sequence number 1 and if the connection is dropped or terminated, the sequence numbers are reset.
Websocket Channel
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
Subscribe Message
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | Valid values S - Subscribe U - Unsubscribe |
types | true | array | Array to identify required types 1 - OrderBook Snapshot 2 - OrderBook Snapshot + Incremental Updates 3 - Trades 4 - Chart 5 - Ticker To subscribe for all types, except orderbook snapshots, [2,3,4,5] is expected. To subscribe for OrderBook Snapshot and Trades and Charts, [1,3,4] is expected. |
symbols | false | array | Optional field to identify the symbol. By default subscription will be enabled for all symbols. BTC/USDC, ETH/USDC, BTC/ETH, BTC/USDC[F] This field will not be applicable for Ticker type and will be ignored if specified. Subscription for ticker will be for all symbols by default. |
level | false | int | Optional field. Applicable only if subscribing for snapshots or snapshots + incremental updates. 1 - Top of the book - Best Bid and Ask 2 - L20 - 20 price levels for bid and ask If not specified, all price levels available (restricted to a maximum value configurable at API level) will for bid and ask will be disseminated by default. |
timespan | false | int | Required if subscribing for chart. 1 - ONE_MINUTE 2 - FIVE_MINUTE 3 - FIFTEEN_MINUTE 4 - ONE_HOUR 5 - SIX_HOUR 6 - ONE_DAY 7 - ONE_WEEK Will be ignored if specified when subscribing only for types other than chart. |
Response
Field | Type | Description |
---|---|---|
requestId | string | Returns the ID of the subscription request the response is meant for. |
sequenceNumber | int | The sequence number of the message |
response | string | The response to the request 1. Subscribed Successfully 2. Unsubscribed Successfully 3. Error A single response will be sent even if the subscription request is for multiple channels, types, endpoints or symbols. If the subscription to any one of these fail, the entire subscription request will be responded with an error. |
event | enum | Returns value sent in request |
types | int | Returns value sent in request |
symbol | array | Returns value sent in request |
level | int | Returns value sent in request |
timespan | int | Returns value sent in request |
errorMessage | string | The error message |
Acceptance Criteria
AC1: Delay in Subscription
Given a TCP connection is created by a client, a time delay to submit a subscription request is configurable at the API level. When the user fails to submit a subscription request within x seconds, then the TCP connection shall be dropped.
AC2: Successful Subscription
Given a TCP connection is created by a client, the client then submits a subscription request for instruments and types not currently subscribed to. If all required fields are configured with valid values, then the client will receive a response confirming a successful subscription and will subsequently start receiving real-time updates.
AC3: Subscription Failure
Given a TCP connection is created by a client, if the client then submits a subscription request with invalid field values, then the client will receive a response indicating an error message describing the failure.
AC4: Successful Unsubscribe
Given the client has successfully subscribed to one or more types, if the client then submits a request to unsubscribe to instruments and types not currently subscribed to (with valid field values present) and the request is successfully processed, then the client will receive a response confirming that the unsubscribe request was successful and will stop receiving real time updates.
AC5: Failure of Unsubscribe
Given the client has successfully subscribed to one or more types, if the client then submits a request to unsubscribe with invalid field values, then the client will receive a response indicating an error message describing the failure.
AC6: Successful Heartbeat
Given the client has successfully subscribed to one or more types and the heartbeat interval is configured as n seconds at the API level, then, when a heartbeat message from a client is received, then the message will be echoed back to the client.
AC7: Heartbeat Miss
Given the client has successfully subscribed to one or more types and the heartbeat interval is configured as n seconds at the API level, with the maximum number of consecutive heartbeats allowed is configured as x at the API level. When x number of heartbeats have not been received from a client, then connection will be dropped and the sequence number will be reset.
WSS1.1 Order Book Channel
Get realtime snapshot of orderbook streamed
Websocket Channel
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
Subscribe Message
Subscribe
{
"requestId":"orderbook_123456",
"event":"S",
"types":[1],
"symbols":["ETH/USDC"],
"level":2
}
import asyncio
import json
import sys
import websocket
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
async def main():
data={}
data["symbols"] = ["BTC/USDC"]
data["event"] = "S"
data["types"] = [1]
data["requestId"] = "TEST_123456"
data["level"] = 2 #1 best ask/bid, 2 Top 20 of book
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
os._exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | S - Subscribe |
types | true | array | [1] - Snapshot [2] - Snapshot + Incremental Updates |
symbols | true | array | ["BTC/USDC"] |
level | false | int | 1 - top of the book only 2 - first 20 levels only If field not present the full orderbook will be provided with a max depth of 64 |
Unsubscribe Message
Unsbscribe
{
"requestId":"orderbook_123456",
"event":"U",
"types":[1],
"symbols":["ETH/USDC"]
}
import asyncio
import json
import sys
import websocket
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
async def main():
data={}
data["symbols"] = ["BTC/USDC"]
data["event"] = "U"
data["types"] = [1]
data["requestId"] = "TEST_123456"
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
os._exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | U - Unsubscribe |
types | true | array | [1] - Snapshot [2] - Snapshot + Incremental Updates |
symbols | true | array | ["BTC/USDC"] |
Response
Response
{
"type": 1,
"pairId": 53,
"bids": [
[
207000,
970000,
1622027405860
],
[
205000,
1000000,
1622027405860
],
...
],
"asks": [
[
210100,
990000,
1622027405860
],
[
210225,
246860000,
1622027405860
],
...
],
"sequence": 0,
"usdMark": 2101.0,
"marketStatus": 0,
"estFundingRate": 0.0,
"fundingRateTime": 0,
"auctionPrice": 0.0,
"auctionVolume": 0.0
}
Main Section
Field | Type | Description |
---|---|---|
type | int | 1 = Order Book Snapshot 2 = Order Book Snapshot + Incremental Updates |
pairId | int | Pair ID |
bids | array | See Bids / Asks Section for details |
asks | array | See Bids / Asks Section for details |
sequence | int | Sequence |
usdMark | double | USD mark |
marketStatus | int | Market status |
estFundingRate | double | Estimated funding rate |
fundingRateTime | int | Time of funding rate |
auctionPrice | double | Price at auction |
auctionVolume | double | Volume at auction |
Bids / Asks Section (Comma Delimited)
Field | Type | Description |
---|---|---|
price | int | Price |
quantity | int | Quantity |
timestamp | int | Timestamp |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
WSS1.1 Trade History Channel
Get realtime trade history
Websocket Channel
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
Subscribe Message
Subscribe
{
"requestId":"test1111",
"event":"S",
"types":[3],
"symbols":["BTC/USDC"]
}
import asyncio
import json
import sys
import websocket
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
async def main():
data={}
data["symbols"] = ["BTC/USDC"]
data["event"] = "S"
data["types"] = [3]
data["requestId"] = "test1111"
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
os._exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | S - Subscribe |
types | true | array | [3] |
symbols | true | array | eg. ["BTC/USDC"] By default subscription will be enabled for all symbols. BTC/USDC, ETH/USDC, BTC/ETH, BTC/USDC[F] This field will not be applicable for Ticker type and will be ignored if specified. Subscription for ticker will be for all symbols by default. |
Unsubscribe Message
Unsubscribe
{
"requestId":"test1111",
"event":"U",
"types":[3],
"symbols":["BTC/USDC"]
}
import asyncio
import json
import sys
import websocket
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
async def main():
data={}
data["symbols"] = ["BTC/USDC"]
data["event"] = "U"
data["types"] = [3]
data["requestId"] = "test1111"
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
os._exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | U - Unsubscribe |
types | true | array | [3] |
symbols | true | array | eg. ["BTC/USDC"] By default subscription will be enabled for all symbols. BTC/USDC, ETH/USDC, BTC/ETH, BTC/USDC[F] This field will not be applicable for Ticker type and will be ignored if specified. Subscription for ticker will be for all symbols by default. |
Response
Response
{
"type":3,
"pairId":52,
"trades": [
[
1132030,
264000,
"20200804-02:39:44.495",
23998,
1
],
[
1135330,
264000,
"20200804-02:12:03.607",
23997,
2
],
...
]
}
Main Section
Field | Type | Description |
---|---|---|
type | int | 3 = Trade History |
pairId | int | Pair ID |
trades | array | See Trade section for details |
Trade Section (Comma Delimited)
Field | Type | Description |
---|---|---|
price | int | Price |
quantity | int | Quantity |
timestamp | string | Timestamp |
tradeId | int | int |
aggressorSide | int | 1 = Buy 2 = Sell |
Price and quantity are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
WSS 1.1 Chart Channel
Returns an array of chart data points in OHLC format
HTTPS Request
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
Request Parameters
Subscribe
{
"requestId":"chart_123456",
"event":"S",
"types":[4],
"symbols":["BTC/USDC"],
"timespan":7
}
import asyncio
import json
import sys
import websocket
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
async def main():
data={}
data["symbols"] = ["BTC/USDC"]
data["event"] = "S"
data["types"] = [4]
data["requestId"] = "chart_123456"
date["timespan"] = 7
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
os._exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | S - Subscribe |
types | true | array | [4] |
symbols | true | array | ["BTC/USDC"] |
timespan | true | int | See Timespan Enum Values |
Timespan Enum Values
Enum | Value |
---|---|
ONE_MINUTE | 1 |
FIVE_MINUTE | 2 |
FIFTEEN_MINUTE | 3 |
ONE_HOUR | 4 |
SIX_HOUR | 5 |
ONE_DAY | 6 |
ONE_WEEK | 7 |
Unsubscribe Message
Unsubscribe
{
"requestId":"chart_123456",
"event":"U",
"types":[4],
"symbols":["BTC/USDC"]
}
import asyncio
import json
import sys
import websocket
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
async def main():
data={}
data["event"] = "U"
data["types"] = [4]
data["requestId"] = "chart_123456"
data["symbols"] = ["BTC/USDC"]
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
os._exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | U - Unsubscribe |
types | true | array | [4] |
symbols | true | array | ["BTC/USDC"] |
Response
Response
{
"type": 4,
"pairId": 53,
"lastPx": 210100,
"lastQty": 10000,
"chart": [
[
1621468800000,
200242,
220736,
184358,
210100,
1790488,
121
],
[
1620864000000,
184406,
262862,
184358,
203790,
7970089,
120
],
...
],
"s": "ETH/USDC",
"t": 7,
"o": 2122.7300000000005,
"h": 2207.3600000000006,
"l": 1959.0300000000004,
"c": 2101.0000000000005,
"v": 57614216.86550003,
"q": 28245.33000000001
}
Main Section
Field | Type | Description |
---|---|---|
type | int | websocket channel number |
pairId | int | |
lastPx | int | Last Traded Price |
lastQty | int | Last Traded Quantity |
chart | array | See Chart Section for details |
s | string | trading symbol eg BTC/USDC |
t | string | Timespan - See Timespan Enum Values |
o | float | Open from 24 hours ago |
h | float | 24 hour rolling High |
l | float | 24 hour rolling Low |
c | float | Last Traded Price |
v | float | Volume USDe |
q | float | 24 hour quantity |
Chart Section (Comma Delimited)
Field | Type | Description |
---|---|---|
timestamp | int | Unix Timestamp |
open | int | |
high | int | |
low | int | |
close | int | |
volume | int | |
seqNumber | int |
Open, high, low, close, volume are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
WSS1.1 Ticker
Publishes ticker events
HTTPS Request
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
Request Parameters
Subscribe
{
"requestId":"ticker_123456",
"event":"S",
"types":[5]
}
import asyncio
import json
import sys
import websocket
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
async def main():
data={}
data["symbols"] = ["BTC/USDC"]
data["event"] = "S"
data["types"] = [5]
data["requestId"] = "ticker_123456"
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
os._exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | S - Subscribe |
types | true | array | [5] |
Unsubscribe Message
Unsubscribe
{
"requestId":"ticker_123456",
"event":"U",
"types":[5]
}
import asyncio
import json
import sys
import websocket
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
async def main():
data={}
data["event"] = "U"
data["types"] = [5]
data["requestId"] = "ticker_123456"
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
os._exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | U - Unsubscribe |
types | true | array | [5] |
Response
Response
{
"type": 5,
"volume1day": 426556218716,
"volume7day": 3798901643598,
"volume30day": 13645460908978,
"ticks": [
{
"symbol": "BTC/USDC[F]",
"lastPx": 4099855,
"lastQty": 550000,
"o": 34426.64000000001,
"h": 40998.55000000001,
"l": 34426.64000000001,
"c": 40998.55000000001,
"v": 965268884.6227705,
"q": 24304.86800000001
},
{
"symbol": "ETH/USDC[F]",
"lastPx": 257489,
"lastQty": 90000,
"o": 2326.2100000000005,
"h": 2791.8200000000006,
"l": 2313.0800000000004,
"c": 2574.8900000000003,
"v": 301021003.6025002,
"q": 119650.67000000004
},
...
]
}
Main Section
Field | Type | Description |
---|---|---|
type | int | websocket channel number |
volume1day | int | 1 day Exchange Volume USDe |
volume7day | int | 7 day Exchange Volume USDe |
volume30day | int | 30 day Exchange Volume USDe |
ticks | array | See Ticks Section |
Ticks Section (Comma Delimited)
Field | Type | Description |
---|---|---|
symbol | string | trading symbol eg BTC/USDC |
lastPx | int | Last Traded Price |
lastQty | int | Last Traded Quantity |
o | float | Open from 24 hours ago |
h | float | 24 hour rolling High |
l | float | 24 hour rolling Low |
c | float | Last Traded Price |
v | float | Volume USDe |
q | float | 24 hour quantity |
lastPx, lastQty are integer numbers. To convert them to double, use the price_scale and quantity_scale defined in getInstrumentPairs
WebSocket 1.1 Private Channels
Authentication is required for private data channels. Authentication can be done in 2 ways. The first way is done via sending a subscribe message with API Username and API Password. The second way is to send a subscribe message with request token and request secret API keys which can be obtained from the API tab on your account settings.
WSS1.1 User Orders Channel
Get user order updates streamed through a websocket channel
Websocket Channel
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
This private channel must be subscribed to by authenticating with either username and password or your API token and API secret. Only 1 channel can be subscribed to at a time when using token and secret authentication.
Subscribe Message
Subscribe
{
"requestId":"test-1006",
"event":"S",
"types":[6],
"username":"[email protected]",
"password":"pwd",
"account":123,
"isInitialSnap":"true"
}
# Event: S
# TradeAccountId: 65547
# Type: 6
# requestId: SOME_REQUEST_ID
# Use requestSecret to sign string "S655476SOME_REQUEST_ID"
import asyncio
import hashlib
import json
import sys
import time
import websocket
import hmac
def sign_ws_request(event, account, type, requestId, secret_key):
signature_hash = hmac.new(secret_key.encode(),
f'{event}{account}{type}{requestId}'.encode(),hashlib.sha384).hexdigest()
return signature_hash
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
username="[email protected]"
password="pwd"
account="1234"
token="api_token"
secret="api_secret"
event="S"
requestId="Test123"
type=6
async def main():
data={}
data["event"] = event
data["types"] = [type]
data["requestId"] = requestId
data["username"] = username
data["password"] = sign_ws_request(event,account,type,requestId)
data["account"] = account
data["useApiKeyForAuth"] = True
data["isInitialSnap"] = True
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | S - Subscribe |
types | true | array | [6] |
username | true | string | eg. "your_username" if useApiKeyForAuth = true, set username to your request token which can be obtained from the API tab on your account settings |
password | true | string | eg. "your_password" if useApiKeyForAuth = true, set password to your signature from hmac("sha384", requestSecret, event+account+types+requestId). "Types" is integer 6 and not [6] here |
account | true (for Institutional User) | int | |
isInitialSnap | false | string | Default value = true. To not receive historical snapshots upon a successful response, use isInitialSnap to false |
useApiKeyForAuth | false | string | default value = false To use the request token and request secret keys for authentication, set useApiKeyForAuth to true |
Response
Response
{
"type":6,
"orders":
[
{"orderId":10713961585,"orderUpdateSeq":0,"clOrdId":"1302016076","symbol":"ETH/USDC","instrumentId":53,"side":"1","userId":53234,"account":123,"execType":"0","ordType":"2","ordStatus":"0","timeInForce":"1","timeStamp":"20210526-02:58:51.8551","execId":0,"targetStrategy":0,"isHidden":false,"isReduceOnly":false,"isLiquidation":false,"fee":0,"feeTotal":0,"fee_scale":0,"feeInstrumentId":0,"price":200000,"price_scale":2,"quantity":1000000,"quantity_scale":6,"leavesQty":1000000,"leavesQty_scale":6,"cumQty":0,"cumQty_scale":0,"lastPx":0,"lastPx_scale":2,"avgPx":0,"avgPx_scale":0,"lastQty":0,"lastQty_scale":6},
{"orderId":10713959234,"orderUpdateSeq":0,"clOrdId":"1302016075","symbol":"ETH/USDC","instrumentId":53,"side":"1","userId":53234,"account":123,"execType":"0","ordType":"2","ordStatus":"0","timeInForce":"1","timeStamp":"20210526-02:57:52.4981","execId":0,"targetStrategy":0,"isHidden":false,"isReduceOnly":false,"isLiquidation":false,"fee":0,"feeTotal":0,"fee_scale":0,"feeInstrumentId":0,"price":200000,"price_scale":2,"quantity":1000000,"quantity_scale":6,"leavesQty":1000000,"leavesQty_scale":6,"cumQty":0,"cumQty_scale":0,"lastPx":0,"lastPx_scale":2,"avgPx":0,"avgPx_scale":0,"lastQty":0,"lastQty_scale":6},
{"orderId":10713826779,"orderUpdateSeq":0,"clOrdId":"nos5143","symbol":"ETH/USDC","instrumentId":53,"side":"1","userId":53234,"account":123,"execType":"0","ordType":"2","ordStatus":"0","timeInForce":"0","timeStamp":"20210526-01:50:29.9650","execId":0,"targetStrategy":0,"isHidden":false,"isReduceOnly":false,"isLiquidation":false,"fee":0,"feeTotal":0,"fee_scale":0,"feeInstrumentId":0,"price":145000,"price_scale":2,"quantity":10000,"quantity_scale":6,"leavesQty":10000,"leavesQty_scale":6,"cumQty":0,"cumQty_scale":0,"lastPx":0,"lastPx_scale":2,"avgPx":0,"avgPx_scale":0,"lastQty":0,"lastQty_scale":6},
{"orderId":10713821636,"orderUpdateSeq":0,"clOrdId":"nos5138","symbol":"ETH/USDC","instrumentId":53,"side":"1","userId":53234,"account":123,"execType":"0","ordType":"2","ordStatus":"0","timeInForce":"0","timeStamp":"20210526-01:47:50.4460","execId":0,"targetStrategy":0,"isHidden":false,"isReduceOnly":false,"isLiquidation":false,"fee":0,"feeTotal":0,"fee_scale":0,"feeInstrumentId":0,"price":145000,"price_scale":2,"quantity":10000,"quantity_scale":6,"leavesQty":10000,"leavesQty_scale":6,"cumQty":0,"cumQty_scale":0,"lastPx":0,"lastPx_scale":2,"avgPx":0,"avgPx_scale":0,"lastQty":0,"lastQty_scale":6},
{"orderId":10713804194,"orderUpdateSeq":0,"clOrdId":"nos5137","symbol":"ETH/USDC","instrumentId":53,"side":"1","userId":53234,"account":123,"execType":"0","ordType":"2","ordStatus":"0","timeInForce":"0","timeStamp":"20210526-01:40:32.0720","execId":0,"targetStrategy":0,"isHidden":false,"isReduceOnly":false,"isLiquidation":false,"fee":0,"feeTotal":0,"fee_scale":0,"feeInstrumentId":0,"price":145000,"price_scale":2,"quantity":10000,"quantity_scale":6,"leavesQty":10000,"leavesQty_scale":6,"cumQty":0,"cumQty_scale":0,"lastPx":0,"lastPx_scale":2,"avgPx":0,"avgPx_scale":0,"lastQty":0,"lastQty_scale":6},
{"orderId":10713804193,"orderUpdateSeq":0,"clOrdId":"nos5136","symbol":"ETH/USDC","instrumentId":53,"side":"1","userId":53234,"account":123,"execType":"0","ordType":"2","ordStatus":"0","timeInForce":"0","timeStamp":"20210526-01:40:31.8680","execId":0,"targetStrategy":0,"isHidden":false,"isReduceOnly":false,"isLiquidation":false,"fee":0,"feeTotal":0,"fee_scale":0,"feeInstrumentId":0,"price":145000,"price_scale":2,"quantity":10000,"quantity_scale":6,"leavesQty":10000,"leavesQty_scale":6,"cumQty":0,"cumQty_scale":0,"lastPx":0,"lastPx_scale":2,"avgPx":0,"avgPx_scale":0,"lastQty":0,"lastQty_scale":6},
{"orderId":10676277388,"orderUpdateSeq":0,"clOrdId":"nos5061","symbol":"ETH/USDC","instrumentId":53,"side":"1","userId":53234,"account":123,"execType":"0","ordType":"2","ordStatus":"0","timeInForce":"0","timeStamp":"20210521-11:40:04.9440","execId":0,"targetStrategy":0,"isHidden":false,"isReduceOnly":false,"isLiquidation":false,"fee":0,"feeTotal":0,"fee_scale":0,"feeInstrumentId":0,"price":225000,"price_scale":2,"quantity":10000,"quantity_scale":6,"leavesQty":10000,"leavesQty_scale":6,"cumQty":0,"cumQty_scale":6,"lastPx":0,"lastPx_scale":2,"avgPx":0,"avgPx_scale":2,"lastQty":0,"lastQty_scale":6}
]
,"isInitialSnap":true
}
Main Section
Field | Type | Description |
---|---|---|
type | int | 6 |
orders | [] | See Order section for details |
isInitialSnap | boolean |
Order Section
Field | Type | Description |
---|---|---|
orderId | int | Unique order identifier assigned by the EQONEX matching engine. |
orderUpdateSeq | int | Order update sequence |
clOrdId | string | Client order ID |
symbol | string | Symbol of instrument |
instrumentId | int | Instrument ID |
side | string | Side of order: 1 = Buy 2 = Sell |
userId | int | User ID |
account | int | for Institutional User |
execType | string | The execution report’s type: 0 = New 4 = Canceled 5 = Replaced 8 = Rejected C = Expired F = Fill Status I = Order Status |
ordType | string | The order type being submitted or reported: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
ordStatus | string | Identifies status of order. 0 = New 1 = Partially filled 2 = Filled 4 = Canceled 8 = Rejected C = Expired |
timeInForce | string | Time in force |
timeStamp | string | Timestamp |
execId | int | Execution ID |
targetStrategy | int | Target Strategy |
isHidden | boolean | If order submitted is an iceberg order |
isReduceOnly | boolean | If order is reduce only |
isLiquidation | boolean | If particular order is due to liquidation |
fee | int | Fee |
feeTotal | int | Cumulative fee charged for this order |
fee_scale | int | Fee scale |
feeInstrumentId | int | Instrument id of fee |
price | int | Price per unit of quantity. Required for “Limit Order”” and “Stop Limit Order” ordType. |
price_scale | int | Price scale |
quantity | int | Quantity |
quantity_scale | int | Quantity scale |
leavesQty | int | Leaves quantity |
leavesQty_scale | int | Leaves quantity scale |
cumQty | int | The cumulative quantity of an order, currently executed in a chain of partial fills. |
cumQty_scale | int | Cumulate quantity scale |
lastPx | int | Last price |
lastPx_scale | int | Last price scale |
lastQty | int | Last quantity |
lastQty_scale | int | Last quantity scale |
avgPx | int | Average price |
avgPx_scale | int | Average price scale |
*orderRejectReason | string | Order reject reason presents if execType = 8 (Rejected) |
*orderRejectReasonEnum | string | Order reject reason enumeration presents if execType = 8 (Rejected) |
isInitialSnap | boolean | Is initial sanpshot |
Fee, FeeTotal, Price, quantity, leavesQty, cumQty, lastPx, lastQty, avgPx are integer numbers. To convert them to double, use their respective scale defined in the response message.
WSS1.1 User Position Channel
Get user risk updates streamed through a websocket channel
Websocket Channel
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
This private channel must be subscribed to by authenticating with either username and password or your API token and API secret. Only 1 channel can be subscribed to at a time when using token and secret authentication.
Subscribe Message
Subscribe
{
"requestId":"test-1007",
"event":"S",
"types":[7],
"username":"[email protected]",
"password":"pwd",
"account":123
}
# Event: S
# TradeAccountId: 65547
# Type: 7
# requestId: SOME_REQUEST_ID
# Use requestSecret to sign string "S655477SOME_REQUEST_ID"
import asyncio
import hashlib
import json
import sys
import time
import websocket
import hmac
def sign_ws_request(event, account, type, requestId, secret_key):
signature_hash = hmac.new(secret_key.encode(),
f'{event}{account}{type}{requestId}'.encode(),hashlib.sha384).hexdigest()
return signature_hash
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
username="[email protected]"
password="pwd"
account="1234"
token="api_token"
secret="api_secret"
event="S"
requestId="Test123"
type=6
async def main():
data={}
data["event"] = event
data["types"] = [type]
data["requestId"] = requestId
data["username"] = username
data["password"] = sign_ws_request(event,account,type,requestId)
data["account"] = account
data["useApiKeyForAuth"] = True
data["isInitialSnap"] = True
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | S - Subscribe |
types | true | array | [7] |
username | true | string | eg. "your_username" if useApiKeyForAuth = true, set username to your request token which can be obtained from the API tab on your account settings |
password | true | string | eg. "your_password" if useApiKeyForAuth = true, set password to your signature from hmac("sha384", requestSecret, event+account+types+requestId). "Types" is integer 7 and not [7] here |
account | true (for Institutional User) | int | |
useApiKeyForAuth | false | string | default value = false To use the request token and request secret keys for authentication, set useApiKeyForAuth to true |
Response
Response
{
"type":7,
"positions":
[
{"instrumentId":1,"userId":53234,"quantity":9990433079353807,"availableQuantity":9990433079353807,"availableTransferQuantity":0,"quantity_scale":6,"symbol":"USDC","assetType":"ASSET","usdCostBasis":0.0,"usdAvgCostBasis":0.0,"usdValue":9.99043307935E9,"usdUnrealized":0.0,"usdRealized":0.0,"baseUsdMark":1.0,"settleCoinUsdMark":0.0,"settleCoinUnrealized":0.0,"settleCoinRealized":0.0},
{"instrumentId":2,"userId":53234,"quantity":10000,"availableQuantity":10000,"availableTransferQuantity":0,"quantity_scale":6,"symbol":"ETH","assetType":"ASSET","usdCostBasis":0.0,"usdAvgCostBasis":0.0,"usdValue":20.8,"usdUnrealized":0.0,"usdRealized":0.0,"baseUsdMark":2080.05,"settleCoinUsdMark":0.0,"settleCoinUnrealized":0.0,"settleCoinRealized":0.0},
{"instrumentId":3,"userId":53234,"quantity":987655,"availableQuantity":987655,"availableTransferQuantity":0,"quantity_scale":6,"symbol":"BTC","assetType":"ASSET","usdCostBasis":0.0,"usdAvgCostBasis":0.0,"usdValue":44444.47,"usdUnrealized":0.0,"usdRealized":0.0,"baseUsdMark":45000.0,"settleCoinUsdMark":0.0,"settleCoinUnrealized":0.0,"settleCoinRealized":0.0},
{"instrumentId":11,"userId":53234,"quantity":1000000,"availableQuantity":1000000,"availableTransferQuantity":0,"quantity_scale":6,"symbol":"BCH","assetType":"ASSET","usdCostBasis":0.0,"usdAvgCostBasis":0.0,"usdValue":912.45,"usdUnrealized":0.0,"usdRealized":0.0,"baseUsdMark":912.45,"settleCoinUsdMark":0.0,"settleCoinUnrealized":0.0,"settleCoinRealized":0.0},
{"instrumentId":25,"userId":53234,"quantity":-8837000,"availableQuantity":-8837000,"availableTransferQuantity":0,"quantity_scale":6,"symbol":"BTC/USDC[F]","assetType":"PERPETUAL_SWAP","usdCostBasis":0.0,"usdAvgCostBasis":15301.0,"usdValue":-201145.49,"usdUnrealized":-201145.49,"usdRealized":-30902.84,"baseUsdMark":38062.74,"settleCoinUsdMark":1.0,"settleCoinUnrealized":0.0,"settleCoinRealized":0.0},
{"instrumentId":450,"userId":53234,"quantity":113890000,"availableQuantity":113890000,"availableTransferQuantity":0,"quantity_scale":6,"symbol":"EQO","assetType":"ASSET","usdCostBasis":0.0,"usdAvgCostBasis":0.0,"usdValue":739.14,"usdUnrealized":0.0,"usdRealized":0.0,"baseUsdMark":6.49,"settleCoinUsdMark":0.0,"settleCoinUnrealized":0.0,"settleCoinRealized":0.0}
]
}
Main Section
Field | Type | Description |
---|---|---|
type | int | 7 = User Position |
positions | [] | See Position section for details |
Position Section
Field | Type | Description |
---|---|---|
instrumentId | int | Instrument ID |
userId | int | User ID |
quantity | int | The quantity owned by the user for the specified symbol in the specified account |
availableQuantity | int | The quantity available for trading and withdrawal for the specified symbol in the specified account |
availableTransferQuantity | int | Available transfer quantity |
quantity_scale | int | Quantity scale |
symbol | string | Symbol of instrument |
assetType | string | Asset type |
usdCostBasis | int | Cost Basis in USD |
usdAvgCostBasis | int | Average cost basis in USD |
usdValue | double | The notional of the position for the specified symbol |
usdUnrealized | double | The unrealized gains or losses for the symbol |
usdRealized | double | The realized gains or losses for the symbol |
baseUsdMark | int | The calculated mark price for the symbol in USD. |
settleCoinUsdMark | int | Settle coin in USD mark |
settleCoinUnrealized | int | Settle coin in unrealized |
settleCoinRealized | int | Settle coin in realized |
tamContribution | double | TAM contribution |
spotOrderAdjustedQuantity | double | Spot order adjusted quantity |
Quantity, availableQuantity are integer numbers. To convert them to double, use their respective scale defined in the response message.
WSS1.1 User Risk Channel
Get user risk updates streamed through a websocket channel
Websocket Channel
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
This private channel must be subscribed to by authenticating with either username and password or your API token and API secret. Only 1 channel can be subscribed to at a time when using token and secret authentication.
Subscribe Message
Subscribe
{
"requestId":"test123",
"event":"S","types":[8],
"username":"[email protected]",
"password":"pwd",
"account":7967
}
# Event: S
# TradeAccountId: 65547
# Type: 8
# requestId: SOME_REQUEST_ID
# Use requestSecret to sign string "S655478SOME_REQUEST_ID"
import asyncio
import hashlib
import json
import sys
import time
import websocket
import hmac
def sign_ws_request(event, account, type, requestId, secret_key):
signature_hash = hmac.new(secret_key.encode(),
f'{event}{account}{type}{requestId}'.encode(),hashlib.sha384).hexdigest()
return signature_hash
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
username="[email protected]"
password="pwd"
account="1234"
token="api_token"
secret="api_secret"
event="S"
requestId="Test123"
type=8
async def main():
data={}
data["event"] = event
data["types"] = [type]
data["requestId"] = requestId
data["username"] = username
data["password"] = sign_ws_request(event,account,type,requestId)
data["account"] = account
data["useApiKeyForAuth"] = True
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | S - Subscribe |
types | true | array | [8] |
username | true | string | eg. "your_username" if useApiKeyForAuth = true, set username to your request token which can be obtained from the API tab on your account settings |
password | true | string | eg. "your_password" if useApiKeyForAuth is = true, set password to your signature from hmac("sha384", requestSecret, event+account+types+requestId). "Types" is integer 8 and not [8] here |
account | false | int | For institutional user, this field must be provided |
useApiKeyForAuth | false | string | default value = false To use the request token and request secret keys for authentication, set useApiKeyForAuth to true |
Response
Response
{
"type":8,
"userId":7967,
"usdValue":1.284332284E7,
"usdMarginAccountTotal":1.074465502E7,
"usdPositionsValue":9559.21,
"usdOpenOrdersNotional":0.0,
"usdMarginReserve":0.0,
"usdMarginReservedBuys":0.0,
"usdMarginReservedSells":0.0,
"usdMarginValue":0.0,
"usdMarginInitial":147.43418000000003,
"usdMarginTrigger":73.71709000000001,
"accountLeverage":0.0,
"usdUnrealized":-2781.59,
"usdMarginAvailable":1.074450759E7,
"riskUpdateDate":"20210525-03:55:26.311"
}
- NOTE: There are additional fields in response from Websocket than below. Those are legacy fields and could be ignored.
Field | Type | Description |
---|---|---|
type | int | 8 = User Risk |
userId | int | User ID |
usdValue | double | Total USDC value of the account including unrealized P&L |
usdPositionsValue | double | USDC notional of current position(s) and open orders |
usdOpenOrdersNotional | double | Notional value of derivative product open orders |
usdMarginReserve | double | Reserved Margin for open orders, expressed as the maximum of usdMarginReservedBuys and usdMarginReservedSells |
usdMarginReservedBuys | double | The additional Initial Margin required if all open buy orders would be filled |
usdMarginReservedSells | double | The additional Initial Margin required if all open sell orders would be filled |
usdMarginInitial | double | The Initial Margin required for open position(s) and open orders |
usdMarginTrigger | double | Minimum Total Account Margin required to prevent liquidation |
usdMarginValue | double | Margin Value in USD |
accountLeverage | double | Account leverage expressing Notional Position as multiple of Total Account Margin |
usdUnrealized | double | Unrealized P&L in USDC |
usdMarginAvailable | double | Margin available to place new orders |
riskUpdateDate | string | Date and Time when the User Risk was last updated |
usdMarginAccountTotal | double | Sum of equivalent USDC notional of all assets available for margin including unrealized P&L, less any capital required for open spot orders |
WSS1.1 Available Trading Balance Channel
Get available trading quantity streamed through a websocket channel
Websocket Channel
Environment | URL |
---|---|
Testnet | wss://testnet.eqonex.com/wsapi |
Production | wss://eqonex.com/wsapi |
This private channel must be subscribed to by authenticating with either username and password or your API token and API secret. Only 1 channel can be subscribed to at a time when using token and secret authentication.
Subscribe Message
Subscribe
{
"requestId":"test123",
"event":"S",
"types":[9],
"username":"[email protected]",
"password":"pwd",
"account":7967
}
# Event: S
# TradeAccountId: 65547
# Type: 9
# requestId: SOME_REQUEST_ID
# Use requestSecret to sign String "S655479SOME_REQUEST_ID"
import asyncio
import hashlib
import json
import sys
import time
import websocket
import hmac
def sign_ws_request(event, account, type, requestId, secret_key):
signature_hash = hmac.new(secret_key.encode(),
f'{event}{account}{type}{requestId}'.encode(),hashlib.sha384).hexdigest()
return signature_hash
try:
import thread
except ImportError:
import _thread as thread
url = "eqonex.com"
username="[email protected]"
password="pwd"
account="1234"
token="api_token"
secret="api_secret"
event="S"
requestId="Test123"
type=9
async def main():
data={}
data["event"] = event
data["types"] = [type]
data["requestId"] = requestId
data["username"] = username
data["password"] = sign_ws_request(event,account,type,requestId)
data["account"] = account
data["useApiKeyForAuth"] = True
def on_message(ws, message):
print(json.dumps(json.loads(message),indent=4))
def on_error(ws, error):
print(error)
def on_close(ws,arg1,arg2):
print("### Exiting websocket test... ###")
def on_open(ws):
ws.send(json.dumps(data, separators=(',', ':')))
def run(*args):
while True:
time.sleep(25)
ws.send(json.dumps({"heartbeat":25}, separators=(',', ':')))
thread.start_new_thread(run, ())
websocket.enableTrace(True)
base_url = f"wss://{url}/wsapi"
ws = websocket.WebSocketApp(base_url,
on_message=on_message,
on_error=on_error,
on_close=on_close)
ws.on_open = on_open
ws.run_forever()
if __name__ == "__main__":
try:
asyncio.run(main())
except KeyboardInterrupt:
print("Exiting websocket test...")
try:
sys.exit(0)
except SystemExit:
exit(0)
Field | Required | Type | Description |
---|---|---|---|
requestId | true | string | The ID of the request. Required for every request. Not validated for uniqueness. |
event | true | enum | S - Subscribe |
types | true | array | [9] |
username | true | string | eg. "your_username" if useApiKeyForAuth = true, set username to your request token which can be obtained from the API tab on your account settings |
password | true | string | eg. "your_password" if useApiKeyForAuth = true, set password to your signature from hmac("sha384", requestSecret, event+account+types+requestId). "Types" is integer 9 and not [9] here |
account | true | int | |
useApiKeyForAuth | false | string | default value = false To use the request token and request secret keys for authentication, set useApiKeyForAuth to true |
Response
Response
{
"instrumentId": 51,
"symbol": "USDT/USDC",
"baseId": 4,
"quoteId": 1,
"availableTradingQuantityBase": 0.0,
"availableTradingQuantityQuote": 0.0,
"timestamp": 1627975165637
},
{
"instrumentId": 52,
"symbol": "BTC/USDC",
"baseId": 3,
"quoteId": 1,
"availableTradingQuantityBase": 0.0,
"availableTradingQuantityQuote": 0.0,
"timestamp": 1627975165637
}
...
Field | Type | Description |
---|---|---|
type | int | 9 = Available trading balance |
userId | int | User ID |
accountId | int | Account ID |
instrumentId | int | Instrument ID |
symbol | string | Symbol of instrument |
timestamp | string | Timestamp |
baseId | int | Id of the base currency for the trading pair |
availableTradingQuantityBase | int | Available trading quantity for the base currency |
quoteId | int | Id of the quote currency for the trading pair |
availableTradingQuantityQuote | int | Available trading quantity for the quote currency |
FIX Overview
FIX Dictionary
The EQONEX FIX implementation is based on the FIX Protocol 4.4 specifications, but also includes some tags from other versions and service packs of the FIX Specification, as well as several User Defined Fields.
EQONEX provides a custom dictionary in the QuickFIX XML format, which is also compatible with a number of other vendors FIX engine implementations.
Please contact [email protected] for access to the dictionary.
Non FIX44 Tags
The following FIX tags may need to be added to your FIX44 dictionary.
Tag | Name | Introduced | Message |
---|---|---|---|
1057 | AggressorIndicator | FIX.4.4 EP21 | ExecutionReport TradeCaptureReport |
1079 | MaturityTime | FIX.4.4 EP21 | SecurityList |
1140 | MaxTradeVol | FIX.5.0 EP42 | SecurityList |
1146 | MinPriceIncrementAmount | FIX.5.0 EP42 | SecurityList |
2576 | InstrumentPricePrecision | FIX.5.0SP2 EP195 | SecurityList |
6867 | CancelOnDisconnect | User Defined Fields | Logon |
Environment Details
EQONEX operates a test network which is a replication of our production environment. API users are strongly recommended to create a testnet account, to test and validate API workflows prior to connecting to the production environment.
Setup a Testnet Account
You can create a Testnet account at Testnet
EQONEX FIX Gateways
Environment | FIX Gateway | Server Address | Port Number | TargetCompID |
---|---|---|---|---|
Testnet | Market Data | fix.testnet.eqonex.com | 4801 | testnet.fix-md.equos |
Testnet | Order Management | fix.testnet.eqonex.com | 4802 | testnet.fix-om.equos |
Testnet | Drop Copy | fix.testnet.eqonex.com | 4803 | testnet.fix-dc.equos |
Production | Market Data | fix.eqonex.com | 5801 | prod.fix-md.equos |
Production | Order Management | fix.eqonex.com | 5802 | prod.fix-om.equos |
Production | Drop Copy | fix.eqonex.com | 5803 | prod.fix-dc.equos |
SSL Proxy
EQONEX FIX endpoints only accept TCP connections secured by SSL/TLS. If your FIX client library cannot establish an SSL/TLS connection natively, you will need to run a local proxy that will establish a secure connection and allow unencrypted local connections.
Stunnel Configuration
[TESTNET.EQONEX.MD]
client=yes
accept=4801
connect=fix.testnet.eqonex.com:4801
verify=4
CAfile=/home/user1/pem/DEMO.EQONEX.MD.pem
[TESTNET.EQONEX.OM]
client=yes
accept=4802
connect=fix.testnet.eqonex.com:4802
verify=4
CAfile=/home/user1/pem/DEMO.EQONEX.OM.pem
[TESTNET.EQONEX.DC]
client=yes
accept=4803
connect=fix.testnet.eqonex.com:4803
verify=4
CAfile=/home/user1/pem/DEMO.EQONEX.DC.pem
[PROD.EQONEX.MD]
client=yes
accept=5801
connect=fix.eqonex.com:5801
verify=4
CAfile=/home/user1/pem/PROD.EQONEX.MD.pem
[PROD.EQONEX.OM]
client=yes
accept=5802
connect=fix.eqonex.com:5802
verify=4
CAfile=/home/user1/pem/PROD.EQONEX.OM.pem
[PROD.EQONEX.DC]
client=yes
accept=5803
connect=fix.eqonex.com:5803
verify=4
CAfile=/home/user1/pem/PROD.EQONEX.DC.pem
This is an example configuration file for stunnel to listen on a port locally and proxy unencrypted TCP connections to the encrypted SSL connection. The service name (EQONEX) and the accept port may be changed to any suitable values.
PEM Certificate Download
# Testnet
> openssl s_client -showcerts -connect fix.testnet.eqonex.com:4801 < /dev/null | openssl x509 -outform PEM > /home/user1/pem/DEMO.EQONEX.MD.pem
> openssl s_client -showcerts -connect fix.testnet.eqonex.com:4802 < /dev/null | openssl x509 -outform PEM > /home/user1/pem/DEMO.EQONEX.OM.pem
> openssl s_client -showcerts -connect fix.testnet.eqonex.com:4803 < /dev/null | openssl x509 -outform PEM > /home/user1/pem/DEMO.EQONEX.DC.pem
# PROD
> openssl s_client -showcerts -connect fix.eqonex.com:5801 < /dev/null | openssl x509 -outform PEM > /home/user1/pem/PROD.EQONEX.MD.pem
> openssl s_client -showcerts -connect fix.eqonex.com:5802 < /dev/null | openssl x509 -outform PEM > /home/user1/pem/PROD.EQONEX.OM.pem
> openssl s_client -showcerts -connect fix.eqonex.com:5803 < /dev/null | openssl x509 -outform PEM > /home/user1/pem/PROD.EQONEX.DC.pem
If your system has OpenSSL installed, you can run this command to download the certificates.
Instruments and Trading Pairs Symbols
Instruments
The following instruments are designated Settlement Currencies or Funding Currencies with the exchange.
Instrument | Settlement Currency | Funding Currency | Account Precision |
---|---|---|---|
USD | ✓ | ✓ | 0.01 USD (1e-2) |
USDC | ✓ | ✓ | 0.000001 USDC (1e-6) |
BTC | ✓ | ✓ | 0.000001 BTC (1e-6) |
ETH | ✓ | ✓ | 0.000001 ETH (1e-6) |
Currency Fields in FIX Protocol
The following FIX tags describe the currency and settlement profile for financial products listed on the EQONEX Exchange, each of these values is published as part of the SecurityList < x > message send in response to a SecurityListRequest < y > message.
FIX Field | Description |
---|---|
Currency<15> | Quantity CCY Base or left hand currency code in the trading pair. |
ContAmtCurr<521> | Price CCY Quote or right hand currency code in the trading pair, or contract denomination for derivatives. |
SettlCurrency<120> | Specifies the currency code of Settlement Account which will settle the trade P&L. |
CommCurrency<479> | Specifies the currency code used for the Funding Account which will settle the commission charge. |
Trading Pairs
The following Trading Pairs are valid values for the Symbol<55> field.
Symbols are formatted as CCY1/CCY2 where prices are in CCY2 Price CCY and quantities are in CCY1 Quantity CCY and "/" is the delimiter.
Symbol | Price CCY | Quantity CCY | Min Order Size | Minimum order increment | Minimum price increment |
---|---|---|---|---|---|
BTC/USDC | USDC | BTC | 0.001 BTC (1e-3) | 0.001 BTC (1e-3) | 0.01 USDC (1e-2) |
ETH/BTC | BTC | ETH | 0.001 ETH (1e-3) | 0.001 ETH (1e-3) | 0.000001 BTC (1e-6) |
ETH/USDC | USDC | ETH | 0.001 ETH (1e-3) | 0.001 ETH (1e-3) | 0.01 USDC (1e-2) |
LINK/USDC | USDC | LINK | 0.001 LINK (1e-3) | 0.001 LINK (1e-3) | 0.0001 USDC (1e-4) |
GRT/USDC | USDC | GRT | 0.01 GRT (1e-2) | 0.01 GRT (1e-2) | 0.0001 USDC (1e-4) |
MATIC/USDC | USDC | MATIC | 0.01 MATIC (1e-2) | 0.01 MATIC (1e-2) | 0.0001 USDC (1e-4) |
BCH/USDC | USDC | BCH | 0.01 BCH (1e-2) | 0.01 BCH (1e-2) | 0.01 USDC (1e-2) |
USDT/USDC | USDC | USDT | 0.001 USDT (1e-3) | 0.0001 USDT (1e-4) | 0.0001 USDC (1e-4) |
EQO/USDC | USDC | EQO | 0.01 EQO (1e-2) | 0.01 EQO (1e-2) | 0.0001 USDC (1e-4) |
Message Identifiers
Client Supplied Identifiers
EQONEX recommends clients to use UUID for identifying their orders. Uniqueness should be maintained over multiple sessions as crypto trading is 24/7 in general.
Indentifier | Message |
---|---|
ClOrdID | Unique Client Order Id |
OrigClOrdID | ExecutionReport |
SecurityReqID | |
SecurityStatusReqID | |
MDReqID | MarketDataRequest |
Standard Header
Each administrative or application message is preceded by a Standard Header. The header identifies the message type, length, destination, sequence number, origination point and timeTwo fields help with resending messages.
The PossDupFlag<43> is set to Y when resending a message as the result of a session level event (i.e. the retransmission of a message reusing a sequence number). The PossResend<97> is set to Y when reissuing a message with a new sequence number (e.g. resending an order). The receiving application should process these messages as follows:
PossDupFlag<43> — if a message with this sequence number has been previously received, ignore message, if not, process normally.
PossResend<97> — forward message to application and determine if previously received (i.e. verify order id and parameters).
Sender Identification
EQONEX Exchange participants are recommended to use the additional FIX Sender Identifiers in the following scenarios, or as needed. Extended identifers set on NewOrderSingle < D> messages, will be echoed in the corresponding ExecutionReport<8> messages.
FIX Identifier | Usage |
---|---|
SenderCompID<49> | Assigned by EQONEX to identify one or more of the clients FIX connections |
Where the order initiator is a human user, via a shared FIX connection, the EQONEX UserID. Where the order initiator is a trading bot, EQONEX recommends using a separate static identifier for each bot with the prefix "bot" | |
Field maybe used at the discretion of the user. |
Third-party Message Delivery
Under development: Message routing via third-parties or FIX order routing networks. Please email [email protected] with any business requirements you might have for this feature.
FIX Identifier | Usage |
---|---|
Assigned value used to identify firm originating message if the message was delivered by a third party i.e. the third party firm identifier would be delivered in the SenderCompID <49> field and the firm originating the message in this field. | |
Assigned value used to identify the firm targeted to receive the message if the message is delivered by a third party i.e. the third party firm identifier would be delivered in the TargetCompID <56> field and the ultimate receiver firm ID in this field. |
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
8 | BeginString | DATATYPE | Y | Identifies the beginning of new message and protocol version. Always the first tag in the message. Valid Value: FIX4.4 |
9 | BodyLength | DATATYPE | Y | Message length, in bytes, forward to the CheckSum <10> field. Always the second tag in the message. |
35 | MsgType | DATATYPE | Y | Defines message type. Always the third tag in the message. |
34 | MesSeqNum | SEQNUM | Y | Message sequence number. |
49 | SenderCompID | STRING | Y | EQONEX Assigned value used to identify firm sending message. SenderCompID = 1000000000+ UserID (which is visible at your user profile page). |
50 | STRING | N | User specified, to identifier initiator of the order (EQONEX UserID, trader, bot, etc.) | |
142 | STRING | N | User specified identifier | |
56 | TargetCompID | STRING | Y | EQONEX Assigned value used to identify receiving FIX gateway. Please note TargetCompID name varies by environment and gateways vary by port number, please see Conencting for specific details. |
115 | STRING | N | Assigned value used to identify firm originating message if the message was delivered by a third party i.e. the third party firm identifier would be delivered in the SenderCompID <49> field and the firm originating the message in this field. | |
128 | STRING | N | Assigned value used to identify the firm targeted to receive the message if the message is delivered by a third party i.e. the third party firm identifier would be delivered in the TargetCompID <56> field and the ultimate receiver firm ID in this field. | |
43 | PossDupFlag | BOOLEAN | C | Indicates possible retransmission of message with this sequence number Y = Possible duplicate |
97 | PossResend | BOOLEAN | C | |
52 | SendingTime | UTCTIMESTAMP | C | The GMT timestamp on the message. |
122 | OrigSendingTime | UTCTIMESTAMP | C | Required for messages sent as a result of a ResendRequest. Original time of message transmission in UTC. |
Standard Trailer
Each message, administrative or application, is terminated by a Standard Trailer. The trailer is used to segregate messages and contains the three digit character representation of the CheckSum<10> value.
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
10 | CheckSum | STRING | Y | Three bytes, simple checksum. Always last field in message. |
FIX Session Management
EQONEX Exchange does not mandate a fixed FIX session commencement or ending time, nor specify or limited the length of time a client maintains a FIX session.
Commencing a Session
EQONEX runs the server side of the FIX connection ("acceptor"). EQONEX never resets sequence numbers on the server side during the logon workflow unless the client explicitly requests it.
The client ("initiator") can reset sequence numbers during Logon < A > by setting ResetSeqNumFlag <141> to Y.
EQONEX recommends that client consider configuring the FIX initiator to automatically reset sequence numbers under the following conditions:
- logon
- logout
- disconnect
- error
EQONEX FIX gateways do not support message replays in general and resend requests will be responded with a sequence number reset messaage in general.
Ending a Session
The client may send the server an optional Logout <5> message but the exchange will not interpret its absence as being an abnormal condition.
Under certain conditions, the server may send the client a Logout <5> message where the Text <58> field contains the reason.
Logon <A>
Heartbeat
Clients may select any HeartBtInt<108> interval, however EQONEX recommends 10 seconds. Clients using the Cancel-On-Disconnect feature should give careful consideration to their heartbeat interval which the server uses in initiating order cancelation.
Passwords
The password used for logon for FIX session is the same as your user's EQONEX login credentials.
Request
8=FIX.4.4|9=110|35=A|49=1000003289|56=testnet.fix-om.equos|34=1744|52=20210910-04:20:11|98=0|108=30|553=user|554=pass|141=Y|10=249|
# Example tag 96 code in python for reference
def sign_api_request(senderCompId, targetCompId, msgSeqNum, sendingTime, secret_key):
signature_hash = hmac.new(secret_key.encode(),
f'{senderCompId}{targetCompId}{msgSeqNum}{sendingTime}'.encode(),hashlib.sha384).hexdigest()
return signature_hash
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = A | ||
98 | EncryptMethod | INT | Y | Always the first tag in the message. Valid Values: 0 = not encrypted is the only accepted value. |
108 | HeartBtInt | INT | Y | Heartbeat interval in seconds. |
141 | ResetSeqNumFlag | BOOLEAN | C | Required to establish logon. Indicates both sides of a FIX session should reset sequence numbers. Y = Yes, reset sequence numbers Note MsgSeqNum(34) should be set to 1. |
789 | SEQNUM | Y | Next expected MsgSeqNum value to be received. Required when connecting to the secondary (standby) FIX Drop Copy server. Please see the FIX Trading Community FIX Session Protocol description on the use of this tag for recovery. | |
553 | Username | STRING | Y | If 20000 = Y, API Access Key will be used for authentication. This can be obtained from the API tab on your account settings. If 20000 = N or absent, User's username/email will be used. |
554 | Password | STRING | C | If 20000 = Y, this tag can be absent. if 20000=N or absent, User's password will be used. |
6867 | CancelOnDisconnect | BOOLEAN | N | When enabled, at Logon, the trading system will cancel all user orders associated with the SenderCompID upon disconnection. Y = enable cancel on disconnect. N = disable cancel on disconnect. |
58 | Text | STRING | N | |
96 | RawData | STRING | C | When 20000 = Y, its value should be hmac(secret_key,senderCompId+targetCompId+msgSeqNum+sendingTime, sha384) |
20000 | IsUsingAPIKey | BOOLEAN | N | A custom tag. When 20000 = Y, API Token and Secret key will be used for logon authentication. |
Standard Trailer | Standard Trailer | Y |
Logout <5>
The Logout<5> message initiates or confirms the termination of a FIX session. Disconnection without the exchange of Logout<5> messages should be interpreted as an abnormal condition.
Before actually closing the session, the logout initiator should wait for the opposite side to respond with a confirming Logout<5> message. This gives the remote end a chance to perform any Gap Fill operations that may be necessary. The session may be terminated if the remote side does not respond in an appropriate timeframe.
After sending the Logout<5> message, the logout initiator should not send any messages unless requested to do so by the logout acceptor via a ResendRequest<2>.
Request
8=FIX.4.4|9=74|35=5|49=testnet.fix-om.equos|56=1000003289|34=39|52=20210910-06:39:26.003|10=234|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = 5 | ||
58 | Text | STRING | N | |
1409 | INT | N | Status of the FIX session. Not sent for scheduled server initiated log outs 3 = New session password does not comply with policy 4 = Session logout complete 5 = Invalid username or password 6 = Account locked 7 = Logons are not allowed at this time 8 = Password expired 9 = Received MsgSeqNum (34) is too low 10 = Received NextExpectedMsgSeqNum (789) is too high 101 = Requested MsgSeqNum unknown (a request has been made for a sequence number that has not been sent by the server). |
|
Standard Trailer | Y |
Heartbeat <0>
The Heartbeat (0) monitors the status of the communication link and identifies when the last of a string of messages was not received.
When either end of a FIX connection has not sent any data for [ HeartBtInt (108) ] seconds, it will transmit a Heartbeat (0) message. When either end of the connection has not received any data for ( HeartBtInt (108) + "some reasonable transmission time") seconds, it will transmit a Test Request (1) message. If there is still no Heartbeat (0) message received after ( HeartBtInt (108) + "some reasonable transmission time") seconds then the connection should be considered lost and corrective action be initiated. If HeartBtInt (108) is set to zero then no regular heartbeat messages will be generated. Note that a test request message can still be sent independent of the value of the HeartBtInt (108) , which will force a Heartbeat (0) message.
Heartbeats issued as the result of Test Request (1) must contain the TestReqID<112> transmitted in the Test Request (1) message. This is useful to verify that the Heartbeat (0) is the result of the Test Request (1) and not as the result of a regular timeout.
Request
8=FIX.4.4|9=73|35=0|49=testnet.fix-om.equos|56=1000003289|34=2|52=20210910-06:42:02.311|10=160|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = 0 | ||
112 | TestReqID | STRING | N | Identifier included in Test Request (1) message to be returned in resulting Heartbeat (0) |
Standard Trailer | Y |
TestRequest <1>
The TestRequest<1> message forces a heartbeat from the opposing application. The TestRequest<1> message checks sequence numbers or verifies communication line status. The opposite application responds to the TestRequest<1> with a HeartBeat<0> containing the TestReqID<112>.
The TestReqID<112> verifies that the opposite application is generating the heartbeat as the result of TestRequest<1> and not a normal timeout. The opposite application includes the TestReqID<112> in the resulting TestRequest<1>. Any string can be used as the TestReqID<112> (one suggestion is to use a timestamp string or simply "TEST").
Request
8=FIX.4.4|9=81|35=1|49=1000003289|56=testnet.fix-om.equos|34=1960|52=20210910-06:43:19|112=TEST|10=150|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = 1 | ||
112 | TestReqID | STRING | Y | Identifier included in Test Request (1) message to be returned in resulting Heartbeat (0) |
Standard Trailer | Y |
ResendRequest <2>
The resend request is sent by the receiving application to initiate the retransmission of messages. This function is utilized if a sequence number gap is detected, if the receiving application lost a message, or as a function of the initialization process.
The resend request can be used to request a single message, a range of messages or all messages subsequent to a particular message.
Note: the sending application may wish to consider the message type when resending messages; e.g. if a new order is in the resend series and a significant time period has elapsed since its original inception, the sender may not wish to retransmit the order given the potential for changed market conditions. (The SequenceReset<4> Gap Fill message is used to skip messages that a sender does not wish to resend.)
Note: it is imperative that the receiving application process messages in sequence order, e.g. if message number 7 is missed and 8-9 received, the application should ignore 8 and 9 and ask for a resend of 7-9, or, preferably, 7-0 (0 represents infinity). This latter approach is strongly recommended to recover from out of sequence conditions as it allows for faster recovery in the presence of certain race conditions when both sides are simultaneously attempting to recover a gap.
To request a single message: BeginSeqNo<7> = EndSeqNo<16>
To request a range of messages: BeginSeqNo<7> = first message of range, EndSeqNo<16> = last message of range
To request all messages subsequent to a particular message: BeginSeqNo<7> = first message of range, = 0 (represents infinity) .
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = 2 | ||
7 | BeginSeqNo | STRING | Y | First sequence number in the range to be resent. |
16 | EndSeqNo | STRING | Y | Last sequence number in the range to be resent. For single message resend requests, set BeginSeqNo = EndSeqNo. If request is for all messages subsequent to a particular message, EndSeqNo = 0. |
Standard Trailer | Y |
Reject <3>
Session Level Message Rejection
EQONEX sends a Reject<3> message in response to a message which is received but cannot be properly processed due to a session-level rule violation. An example of when a reject may be appropriate would be the receipt of a message with invalid basic data (e.g. MsgType=&) which successfully passes de-encryption, CheckSum (10) and BodyLength (9) checks.
As a rule, messages should be forwarded to the trading application for business level rejections whenever possible.
Response
8=FIX.4.4|9=125|35=3|49=testnet.fix-om.equos|56=1000003289|34=12|52=20210910-06:45:30.728|45=1965|371=60|372=D|373=1|58=Required tag missing|10=089|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = 3 | ||
45 | RefSeqNum | SEQNUM | Y | Message Sequence Number of rejected message |
371 | RefTagID | STRING | Y | The tag number of the FIX field being referenced. |
372 | RefMsgType | STRING | Y | The MsgType(35) of the FIX message being rejected. |
373 | SessionRejectReason | INT | Y | Code to identify reason for a session-level Reject message. 1 = Required tag missing 5 = Value is incorrect (out of range) for this tag 6 = Incorrect data format for value 11 = Invalid MsgType (35) |
58 | Text | STRING | N | Text message elaboriting Reject Reason, where required |
Standard Trailer | Y |
SequenceReset <4>
The Sequence Reset <4> message is used in response to a Resend Request <2> message when one or more messages must be skipped over for the following reasons:
During normal resend processing, the sending application may choose not to send a message (e.g. an aged order). During normal resend processing, a number of administrative messages are skipped and not resent (such as Heartbeat <0> and Test Request <1>).
EQONEX will send sequence number reset as a response to resend request as we do not support resending missed messages.
Request
8=FIX.4.4|9=90|35=4|49=testnet.fix-om.equos|56=1000003289|34=9|43=Y|52=20210910-06:29:36.267|123=Y|36=10|10=243|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = 4 | ||
123 | GapFillFlag | BOOLEAN | N | Indicates that the Sequence Reset message is replacing administrative or application messages which will not be resent. Y = Gap Fill Message, Msg Seq Num Field Valid N = Sequence Reset, Ignore Msg Seq Num |
36 | NewSeqNo | SEQNUM | Y | New sequence number |
Standard Trailer | Y |
BusinessMessageReject <j>
The BusinessMessageReject
Response
8=FIX.4.4|9=125|35=j|49=testnet.fix-om.equos|56=1000003289|34=45|52=20210910-06:58:21.832|45=1992|371=60|372=D|373=1|58=Required tag missing|10=095|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = j | ||
45 | RefSeqNum | SEQNUM | N | Message Sequence Number of rejected message |
372 | RefMsgType | STRING | Y | The Message Type of the FIX message being rejected |
371 | RefTagID | INT | N | The tag number of the FIX field being referenced. Only sent when ‘Business Reject Message’ message is generated by the FIX engine. |
379 | BusinessRejectRefID | STRING | N | The value of the business-level "ID" field on the message being referenced. |
380 | BusinessRejectReason | INT | Y | Code to identify reason for this reject message: 1 = Unknown ID 2 = Unknown Security 3 = Unsupported Message Type 5 = Conditionally Required field missing 6 = Not authorized 0 = Other |
58 | Text | STRING | N | Additional description of the error, when required |
Standard Trailer | Y |
FIX Market Data
SecurityListRequest <x>
The Security List Request message is used to return a list of securities from EQONEX that match criteria provided on the request. Subscription for security status can be optionally specified by including the SecurityListRequestType(559) field on the message.
SubscriptionRequestType(263) specifies the criteria of the request:
Presently 559=4 is the only supported lookup
Request
8=FIX.4.4|9=96|35=x|49=1000005770|56=prod.fix-md.equos|34=1937|52=20210916-00:56:45|320=2037299118|559=4|263=1|10=116|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = x | ||
320 | SecurityReqID | STRING | Y | Unique security request ID set by client |
559 | SecurityListRequestType | INT | Y | Identifies the type/criteria of Security List Request 4 = All Securities |
263 | SubscriptionRequestType | INT | N | Subscription Request Type 0 = Snapshot 1 = Snapshot + Updates (Subscribe) 2 = Disable previous Snapshot + Update Request (Unsubscribe) |
Standard Trailer | Y |
SecurityList <y>
The Security List message is used to return a list of securities (instruments) that match the criteria specified in a Security List Request.
SecurityAltID
EQONEX supports 3 alternative Security Identifier Sources:
- M = EQONEX Exchange Instrument ID
- 8 = EQONEX Exchange Symbol (used in tag Symbol<55>)
- S = Financial Instrument Global Identifier
Tag Usage by Security Type
Tag | FIX Name | Spot | Perpetual | Future | Option |
---|---|---|---|---|---|
Instrument Data | |||||
55 | Symbol | ✓ | ✓ | ✓ | ✓ |
Underlying | |||||
311 | UnderlyingSymbol | ✗ | ✓ | ✓ | ✓ |
309 | UnderlyingSecurityID | ✗ | ✓ | ✓ | ✓ |
305 | UnderlyingSecurityIDSource | ✗ | ✓ | ✓ | ✓ |
Trading Rules | |||||
55 | Symbol | ✓ | ✓ | ✓ | ✓ |
Response
8=FIX.4.4|9=2653|35=y|49=prod.fix-md.equos|56=1000005770|34=11|52=20210916-00:56:45.274|320=2037299118|322=1631753805267|560=0|393=11|893=Y|146=11|55=MATIC/USDC|454=3|455=MATIC/USDC|456=8|455=506|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=MATIC/USDC|2576=4|969=0.01|1146=1|15=MATIC|521=USDC|120=USDC|479=USDC|561=0.000001|562=0.010000|1140=0.000000|965=1|55=ETH/USDC|454=3|455=ETH/USDC|456=8|455=53|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=ETH/USDC|2576=2|969=1|1146=1|15=ETH|521=USDC|120=USDC|479=USDC|561=0.001000|562=0.001000|1140=0.000000|965=1|55=GRT/USDC|454=3|455=GRT/USDC|456=8|455=504|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=GRT/USDC|2576=4|969=0.0001|1146=1|15=GRT|521=USDC|120=USDC|479=USDC|561=0.000001|562=0.010000|1140=0.000000|965=1|55=USDT/USDC|454=3|455=USDT/USDC|456=8|455=51|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=USDT/USDC|2576=4|969=1|1146=1|15=USDT|521=USDC|120=USDC|479=USDC|561=0.000001|562=0.001000|1140=0.000000|965=1|55=ETH/BTC|454=3|455=ETH/BTC|456=8|455=57|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=ETH/BTC|2576=6|969=1|1146=1|15=ETH|521=BTC|120=BTC|479=BTC|561=0.000001|562=0.001000|1140=0.000000|965=1|55=BCH/USDC|454=3|455=BCH/USDC|456=8|455=61|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=BCH/USDC|2576=2|969=1|1146=1|15=BCH|521=USDC|120=USDC|479=USDC|561=0.000001|562=0.010000|1140=0.000000|965=1|55=BTC/USDC|454=3|455=BTC/USDC|456=8|455=52|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=BTC/USDC|2576=2|969=1|1146=1|15=BTC|521=USDC|120=USDC|479=USDC|561=0.000001|562=0.001000|1140=0.000000|965=1|55=LINK/USDC|454=3|455=LINK/USDC|456=8|455=502|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=LINK/USDC|2576=4|969=0.0001|1146=1|15=LINK|521=USDC|120=USDC|479=USDC|561=0.000001|562=0.001000|1140=0.000000|965=1|55=BTC/USDC[F]|454=3|455=BTC/USDC[F]|456=8|455=25|456=M|455=XXXXXXXXXXXX|456=S|461=FFCNSX|200=197001w1|541=19700101|1079=19700101-00:00:00.000|201=0|225=20200828-09:48:07.000|202=0|947=USDC|207=EQOD|107=BTC/USDC[F]|2576=2|969=1|1146=1|15=BTC|521=USDC|120=USDC|479=USDC|561=0.000001|562=0.001000|1140=0.000000|965=1|854=0|55=ETH/USDC[F]|454=3|455=ETH/USDC[F]|456=8|455=29|456=M|455=XXXXXXXXXXXX|456=S|461=FFCNSX|200=197001w1|541=19700101|1079=19700101-00:00:00.000|201=0|225=20200828-09:48:07.000|202=0|947=USDC|207=EQOD|107=ETH/USDC[F]|2576=2|969=1|1146=1|15=ETH|521=USDC|120=USDC|479=USDC|561=0.001000|562=0.001000|1140=0.000000|965=1|854=0|55=EQO/USDC|454=3|455=EQO/USDC|456=8|455=452|456=M|455=XXXXXXXXXXXX|456=S|461=IFXXXP|207=EQOC|107=EQO/USDC|2576=4|969=1|1146=1|15=EQO|521=USDC|120=USDC|479=USDC|561=0.000001|562=0.010000|1140=0.000000|965=1|10=023|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = y | ||
320 | SecurityReqID | STRING | N | Unique security request ID set by client |
322 | SecurityResponseID | STRING | N | EQONEX Identifier for the Security List message |
893 | LastFragment | BOOLEAN | N | Indicates whether this message is the last in a sequence of messages for those messages that support fragmentation, such as Security List. N = Not last message Y = Last message. |
393 | TotNoRelatedSym | INT | N | Used to indicate the total number of securities being returned for this request. Used in the event that message fragmentation is required. |
560 | SecurityRequestResult | INT | N | Result of the Security Request identified by the SecurityReqID. 0 = Valid request 1 = Invalid or unsupported request 2 = No instruments found that match selection criteria. |
146 | NoRelatedSym | NUMINGROUP | Y | Specifies the number of repeating symbols (instruments) specified |
→ 55 | Symbol | STRING | C | EQONEX exchange Symbol |
→ 454 | NoSecurityAltID | NUMINGROUP | ? | Number of SecurityAltID (455) entries. 455=3. |
→ → 455 | SecurityAltID | STRING | C | Financial Instrument Global Identifier see OpenFIGI |
→ → 456 | SecurityAltIDSource | STRING | C | Identifies source of the SecurityID(48) value. S = Financial Instrument Global Identifier |
→ → 455 | SecurityAltID | STRING | C | Financial Instrument Global Identifier see OpenFIGI |
→ → 456 | SecurityAltIDSource | STRING | C | Identifies source of the SecurityID(48) value. S = Financial Instrument Global Identifier |
→ → 455 | SecurityAltID | STRING | C | Financial Instrument Global Identifier see OpenFIGI |
→ → 456 | SecurityAltIDSource | STRING | C | Identifies source of the SecurityID(48) value. S = Financial Instrument Global Identifier |
→ 461 | CFICode | STRING | C | Indicates the type of security using ISO 10962 standard, Classification of Financial Instruments (CFI code) values. |
→ 207 | SecurityExchange | STRING | C | |
→ 1301 | MarketID | STRING | C | ISO 10383 Market Identifier Code (MIC). |
→ 107 | SecurityDesc | STRING | C | Textual description for the instrument. |
→ 2576 | InstrumentPricePrecision | INT | C | Specifies the number of decimal places for instrument prices. |
→ 969 | MinPriceIncrement | FLOAT | C | Minimum price change for a given symbol. |
→ 1146 | MinPriceIncrementAmount | AMOUNT | C | Minimum price increment amount associated with the MinPriceIncrement(969). For listed derivatives, the value can be calculated by multiplying MinPriceIncrement by ContractValueFactor(231). |
→ 15 | Currency | CURRENCY | N | Base or left hand currency code in the trading pair. |
→ 521 | ContAmtCurr | CURRENCY | N | Quote or right hand currency code in the trading pair. |
→ 120 | SettlCurrency | CURRENCY | N | Currency code of settlement denomination. |
→ 479 | CommCurrency | CURRENCY | N | Specifies currency code used for commission. |
→ 200 | MaturityMonthYear | MONTHYEAR | C | Can be used with standardized derivatives vs. the MaturityDate (541) field. Month and Year of the maturity (used for standardized futures and options). Format: YYYYMM (i.e. 99903) YYYYMMDD (20030323) YYYYMMwN (200303w) for week A specific date or can be appended to the MaturityMonthYear. For instance, if multiple standard products exist that mature in the same Year and Month, but actually mature at a different time, a value can be appended, such as "w" or "w2" to indicate week as opposed to week 2 expiration. Likewise, the date (0-3) can be appended to indicate a specific expiration (maturity date). |
→ 541 | MaturityDate | UTCTIMESTAMP | C | Date of a derivatives contract maturity. |
→ 1079 | MaturityTime | UTCTIMESTAMP | C | Time of a derivatives contract maturity. |
→ 854 | QtyType | INT | C | Type of quantity specified in a quantity field: 0 = Units (shares, par, currency) 1 = Contracts (if used - must specify ContractMultiplier (tag 231)) |
→ 231 | ContractMultiplier | FLOAT | C | For a futures instrument: The quantity of underlying units per 1 futures contract |
→ 201 | PutOrCall | BOOLEAN | C | Indicates whether an option contract is a put or call: 0 = Put 1 = Call |
→ 202 | StrikePrice | PRICE | C | Strike Price for an Option. |
→ 947 | StrikeCurrency | CURRENCY | C | Currency in which the StrikePrice is denominated. |
→ 561 | RoundLot | QTY | N | The round lot for the instrument. |
→ 562 | MinTradeVol | QTY | N | The minimum order quantity that can be submitted for an order. |
→ 1140 | MaxTradeVol | QTY | N | The maximum order quantity that can be submitted for a security. |
→ 965 | SecurityStatus | INT | Y | Denotes the current state of the Instrument 1 = Active 2 = Inactive 3 = Active, closing orders only 4 = Expired (Contract) 5 = Delisted 9 = Suspended 10 = Published |
Standard Trailer | Y |
MarketDataRequest <V>
A Market Data Request
Request
8=FIX.4.4|9=144|35=V|49=1000005770|56=prod.fix-md.equos|34=2004|52=20210916-01:29:20|262=2037299120|263=1|264=1|265=1|266=Y|267=2|269=0|269=1|146=1|55=ETH/USDC|10=188|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = V | ||
262 | MDReqID | STRING | Y | A unique ID assigned by the client to the market data request |
263 | SubscriptionRequestType | CHAR | Y | Subscription Request Type: 1 = Snapshot + Updates (Subscribe) 2 = Disable previous Snapshot + Update Request (Unsubscribe) |
264 | MarketDepth | INT | Y | Depth of Market for Snapshot: 0 = Full Book 1 = Top of Book |
265 | MDUpdateType | INT | N | Specifies the type of Market Data update. Required if SubscriptionRequestType = 1 Snapshot + Updates (Subscribe) 0 = Full refresh 1 = Incremental refresh |
266 | AggregatedBook | BOOLEAN | Y | Specifies whether or not book entries should be aggregated. It is set to Y regardless of input. Y = book entries to be aggregated |
Repeating Group | < NoMDEntryTypes > (No of Market Data Entry Types) | |||
267 | NoMDEntryTypes | NUMINGROUP | Y | Number of Market Data types being requested in MDEntryType |
→ 269 | MDEntryType | CHAR | Type of Market Data entry 0 = Bid 1 = Offer 2 = Trade |
|
end group | < NoMDEntryTypes > | |||
group | < NoRelatedSym > | |||
146 | NoRelatedSym | NUMINGROUP | Y | Number of Symbols in the request. |
→ 55 | Symbol | STRING | C | EQONEX Exchange Symbol, if using Se |
→ 48 | SecurityID | STRING | C | The Security Indentifier (type) as specified/requested in SecurityIDSource(22) |
→ 22 | SecurityIDSource | STRING | C | Identifies class or source of the SecurityID(48) value. |
end group | < NoRelatedSym > | |||
Standard Trailer | Standard Trailer | Y |
MarketDataRequestReject <Y>
The Market Data Request Reject <Y> is used when EQONEX cannot honor the Market Data Request, due to business or technical reasons. Clients may choose to limit various parameters, such as the size of requests, whether just the top of book or the entire book may be displayed, and whether Full or Incremental updates must be used.
Response
8=FIX.4.4|9=153|35=9|49=testnet.fix-md.equos|262=12899889|281=0|58=Unknown symbol|10=088|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = Y | ||
262 | MDReqID | STRING | Y | A unique ID assigned by the client to the market data request, which is being rejected |
281 | MDReqRejReason | CHAR | N | Reason for the rejection of a Market Data request: 0 = Unknown symbol 1 = Duplicate MDReqID 2 = Insufficient Bandwidth 3 = Insufficient Permissions 4 = Unsupported SubscriptionRequestType 5 = Unsupported MarketDepth 6 = Unsupported MDUpdateType |
58 | Text | STRING | N | Free format text string describing the reason for the rejection. |
Standard Trailer | Standard Trailer | Y |
MarketDataSnapshotFullRefresh <W>
The Market Data messages are used as the response to a Market Data Request message. In all cases, one Market Data message refers only to one Market Data Request. It can be used to transmit a 2-sided book of orders or list of quotes, a list of trades, index values, opening, closing, settlement, high, low, or VWAP prices, the trade volume or open interest for a security, or any combination of these.
Request
8=FIX.4.4|9=1569|35=W|49=prod.fix-md.equos|56=1000005770|34=93|52=20210916-01:29:20.367|262=2037299120|55=ETH/USDC|48=53|22=8|268=58|269=0|270=3593.32|271=22.263|269=0|270=3593.06|271=0.5|269=0|270=3592.95|271=14.2|269=0|270=3592.44|271=0.834|269=0|270=3591.84|271=0.89|269=0|270=3591.09|271=0.5|269=0|270=3590.8|271=30|269=0|270=3590.08|271=40|269=0|270=3590.03|271=1|269=0|270=3588.66|271=0.5|269=0|270=3588.53|271=3|269=0|270=3588.16|271=40|269=0|270=3587.81|271=6|269=0|270=3587.47|271=8|269=0|270=3586.75|271=10|269=0|270=3586.56|271=3.48|269=0|270=3586.09|271=0.5|269=0|270=3584.35|271=12|269=0|270=3582.63|271=12.504|269=0|270=3577.98|271=4.2|269=0|270=3482.96|271=3.59|269=0|270=3150|271=0.05|269=0|270=3110|271=0.05|269=0|270=3070|271=0.1|269=0|270=3040|271=0.05|269=0|270=3000|271=0.52|269=0|270=2927|271=0.35|269=0|270=2911|271=0.1|269=0|270=2810|271=0.25|269=0|270=2800|271=1.203|269=0|270=2750|271=10|269=0|270=2720|271=6.4|269=0|270=2688|271=0.6|269=0|270=2550|271=10.829|269=0|270=2540|271=0.099|269=0|270=2530|271=0.001|269=0|270=2500|271=0.07|269=1|270=3596.21|271=22.246|269=1|270=3596.22|271=8.33|269=1|270=3596.46|271=14.99|269=1|270=3598.72|271=1|269=1|270=3598.8|271=30|269=1|270=3599.27|271=0.652|269=1|270=3599.83|271=40|269=1|270=3600.09|271=3|269=1|270=3601.32|271=6|269=1|270=3601.65|271=40|269=1|270=3602.03|271=8|269=1|270=3602.16|271=10|269=1|270=3603.46|271=40|269=1|270=3605.03|271=12|269=1|270=3605.36|271=40|269=1|270=3606.59|271=6|269=1|270=3645.43|271=6|269=1|270=3750|271=4|269=1|270=4002.5|271=0.1|269=1|270=4050|271=0.1|269=1|270=4068.68|271=0.05|10=176|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = W | ||
262 | MDReqID | STRING | Y | A unique ID assigned by the client when responding to a MarketDataRequest < V > |
55 | Symbol | STRING | C | EQONEX Exchange Symbol |
48 | SecurityID | STRING | C | The Security Identifier (type) as specified/requested in SecurityIDSource(22) |
22 | SecurityIDSource | STRING | C | Identifies class or source of the SecurityID(48) value. |
group | < NoMDEntries > | |||
268 | NoMDEntries | NUMINGROUP | Y | Number of entries following. |
→ 269 | MDEntryType | CHAR | Y | Must be the first field in this repeating group. 0 = Bid 1 = Offer 2 = Trade (Trade-By-Level) 3 = Index Value 4 = Opening Price 5 = Closing Price 6 = Settlement Price 7 = Trading session high price 8 = Trading session low price A = Imbalance B = Total Traded Volume / Volume (VOI) when paired with 269=C C = Open Interest D = Composite Underlying Price J = Empty book M = Prior Settle Price Q = Auction Clearing Price (Equilibrium Price). u = Anomalous Order Threshold Reference Price v = Anomalous Order Threshold Upper Range w = Anomalous Order Threshold Lower Range x = Extreme Trade Range Reference Price y = Extreme Trade Range Upper Range z = Extreme Trade Range Lower Range |
→ 270 | MDEntryPx | PRICE | Price of the Market Data Entry. | |
→ 271 | MDEntrySize | QTY | Size of the Market Data Entry. | |
→ 272 | MDEntryDate | UTCDateOnly | C | Date of Market Data Entry (Trades only). |
→ 273 | MDEntryTime | UTCTimeOnly | C | Time of Market Data Entry (Trades only). |
→ 274 | TickDirection | CHAR | C | Direction of the "tick" 0 = Plus Tick 1 = Zero-Plus Tick 2 = Minus Tick 3 = Zero-Minus Tick |
end group | < NoMDEntries > | |||
Standard Trailer | Y |
MarketDataIncrementalRefresh <X>
The second Market Data message format is used for incremental updates. Market Data Entries may have an MDEntryID <278> unique among all currently active Market Data Entries so they can be referenced for the purposes of deleting and changing them later. When changing a Market Data Entry, it may keep the same MDEntryID <278>, in which case only MDEntryID <278> would be populated, or the MDEntryID <278> may change, in which case MDEntryID <278> will contain the new ID, and MDEntryRefID <280> will contain the ID of the Market Data Entry being changed. An MDEntryID <278> can be reused within a day only if it has first been deleted.
Request
8=FIX.4.4|9=147|35=X|49=prod.fix-md.equos|56=1000005770|34=94|52=20210916-01:29:20.385|262=2037299120|268=1|279=0|269=0|55=ETH/USDC|48=53|22=8|270=3591.72|271=8.1|10=113|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = X | ||
262 | MDReqID | STRING | Y | A unique ID assigned by the client to the market data request |
group | < NoMDEntries > Number of Market Data entries | |||
268 | NoMDEntries | NUMINGROUP | Y | Number of Market Data entries following. |
→ 279 | MDUpdateAction | CHAR | Y | Must be the first tag in each repeating group. Valid values: 0 = New 1 = Change 2 = Delete. |
→ 285 | DeleteReason | CHAR | Y | Reason for deletion. Valid values: 0 = cancelation / Trade Bust 1 = Error |
→ 55 | Symbol | STRING | N | EQONEX Exchange Symbol |
→ 48 | SecurityID | STRING | N | The Security Identifier (type) as specified/requested in SecurityIDSource(22) |
→ 22 | SecurityIDSource | STRING | N | Identifies class or source of the SecurityID(48) value. |
→ 269 | MDEntryType | CHAR | Y | Must be the first field in this repeating group. 0 = Bid 1 = Offer 2 = Trade (Trade-By-Level) 3 = Index Value 4 = Opening Price 5 = Closing Price 6 = Settlement Price 7 = Trading session high price 8 = Trading session low price A = Imbalance B = Total Traded Volume / Volume (VOI) when paired with 269=C C = Open Interest D = Composite Underlying Price J = Empty book M = Prior Settle Price Q = Auction Clearing Price (Equilibrium Price). u = Anomalous Order Threshold Reference Price v = Anomalous Order Threshold Upper Range w = Anomalous Order Threshold Lower Range x = Extreme Trade Range Reference Price y = Extreme Trade Range Upper Range z = Extreme Trade Range Lower Range |
→ 270 | MDEntryPx | PRICE | Price of the Market Data Entry. | |
→ 271 | MDEntrySize | QTY | Size of the Market Data Entry. | |
→ 272 | MDEntryDate | UTCDateOnly | C | Date of Market Data Entry (Trades only). |
→ 273 | MDEntryTime | UTCTimeOnly | C | Time of Market Data Entry (Trades only). |
→ 274 | TickDirection | CHAR | C | Direction of the "tick" 0 = Plus Tick 1 = Zero-Plus Tick 2 = Minus Tick 3 = Zero-Minus Tick |
end group | < NoMDEntries > | |||
Standard Trailer | Y |
FIX Order Management
NewOrderSingle <D>
The NewOrderSingle
If SecurityID is used the ID and SecurityIDSource will be echoed in ExecutionReport<8>
Request
8=FIX.4.4|9=161|35=D|49=1000003289|56=testnet.fix-om.equos|34=1921|52=20210910-06:28:22|11=1352951759|1=3289|55=ETH/USDC|54=1|40=2|44=3300|38=0.01|60=20210317-06:09:37.000|59=1|10=196|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = D | ||
1 | Account | STRING | N | Specify valid account id for on behalf of order submission. Submitting session user should have required privilege. |
11 | ClOrdID | STRING | Y | UUID selected by client to identify the order Unique identifier for Order as assigned by the client. Uniqueness must be guaranteed across trading sessions. |
55 | Symbol | STRING | C | EQONEX exchange Symbol, if using SecurityID/SecurityIDSource fields, set Symbol to N/A |
48 | SecurityID | STRING | C | Security identifier of the form specified SecurityIDSource<22> |
22 | SecurityIDSource | STRING | C | Identifies source of the SecurityID<48> value. M = EQONEX Instrument ID 8 = EQONEX Exchange Symbol S = Financial Instrument Global Identifier |
54 | Side | CHAR | Y | Side of order: 1 = Buy 2 = Sell |
38 | OrderQty | QTY | Y | Order quantity specified in the base Currency<15> or Contracts |
40 | OrdType | CHAR | Y | The following order types can be placed: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
18 | ExecInst | MultipleValueString | N | Instructions for handling the order. If more than one instruction is applicable to an order, this field can contain multiple instructions separated by space. 6 = Post Only |
44 | Price | PRICE | N | Order limit price. |
99 | StopPx | PRICE | C | The price at which the stop is triggered. Required for OrdType<40> = 3 (Stop Order) or = 4 (Stop Limit Order) |
59 | TimeInForce | CHAR | N | Specifies how long the order remains in effect. Absence of this field is interpreted as "Good Till Cancel". Valid values: 1 = Good Till Cancel (GTC) 3 = Immediate or Cancel (IOC) 4 = Fill or Kill (FOK) P.S. MKT orders only support IOC or FOK. Lack of TIF for MKT orders will default to IOC |
20003 | UserOrderLabel | STRING | N | User specified order label, will be echoed on all ExecutionReport<8> with this ClOrdID<11> Maximum of 60 characters |
847 | TargetStrategy | INT | C | Value=150 for Stop Order. Required for OrdType<40> = 3 (Stop Order) |
60 | TransactTime | UTCTIMESTAMP | Y | Timestamp when the business transaction represented by the message occurred. |
Standard Trailer | Y |
ExecutionReport <8>
The Execution Report <8> message is used to:
- Confirm the receipt of an order
- Confirm changes to an existing order
- Confirm or convey an order cancelation or expiration
- Convey fill information on working orders
- Reject orders
- Convey information about re-stated long orders carried from one trading session to the next.
Response
8=FIX.4.4|9=265|35=8|49=testnet.fix-om.equos|56=1000003289|34=4|52=20210910-06:28:22.749|37=11004403241|11=1352951759|453=1|448=3289|447=D|452=36|17=0|150=0|39=0|1=3289|55=ETH/USDC|48=53|22=8|54=1|38=0.01|40=2|44=3300|99=0|59=1|32=0|31=0|151=0.01|14=0|6=0|60=20210910-06:28:22.746|10=031|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = 8 | ||
37 | OrderID | STRING | Y | Unique order identifier assigned by the EQONEX matching engine. |
11 | ClOrdID | STRING | Y | UUID selected by client to identify the order Unique identifier for Order as assigned by the client. Uniqueness must be guaranteed across trading sessions. |
41 | OrigClOrdID | STRING | N | ClOrdID of the order to cancel/replace (originally assigned by the client). |
453 | NoPartyIDs | NUMINGROUP | N | |
→ 448 | PartyID | STRING | N | Used to identify source of PartyID <448>. Required if PartyIDSource <447> is specified. Required if NoPartyIDs <453> > 0. |
→ 447 | PartyIDSource | CHAR | N | Identifies class or source of the PartyID <448> value. Required if PartyID <448> is specified. Note: applicable values depend upon PartyRole <452> specified. |
→ 452 | PartyRole | INT | N | Identifies the type of PartyID <448> (e.g. Executing Broker). Required if NoPartyIDs <453> > 0. |
17 | ExecID | STRING | N | identifier of the execution report. |
150 | ExecType | CHAR | Y | The execution report’s type: 0 = New 4 = Canceled 5 = Replace 8 = Rejected C = Expired F = Fill Status I = Order Status |
39 | OrdStatus | CHAR | Y | Identifies status of order. 0 = New 1 = Partially filled 2 = Filled 3 = Done for Day 4 = canceled 8 = Rejected C = Expired. |
1 | Account | STRING | Y | Specify valid account id for on behalf of order submission. Submitting session user should have required privilege. |
434 | CxlRejResponseTo | CHAR | Y | Identifies the type of request that a Cancel Reject is in response to. 1 = Order cancel request 2 = Order cancel/replace request. |
102 | CxlRejReason | CHAR | N | Code to identify reason for cancel rejection. 0 = Too late to cancel 1 = Unknown order 2 = Broker/Exchange Option 6 = Duplicate ClOrdID (11) received 8 = Price exceeds current price band 99 = Other |
55 | Symbol | STRING | C | EQONEX exchange Symbol, still returned even if using SecurityID/SecurityIDSource fields used in in the initiating order, and set Symbol<55> set to N/A |
48 | SecurityID | STRING | C | Security identifier of the form specified SecurityIDSource<22> of the type used on the initiating order |
22 | SecurityIDSource | STRING | C | Identifies source of the SecurityID<48> value. M = EQONEX Instrument ID 8 = EQONEX Exchange Symbol S = Financial Instrument Global Identifier of the type used on the initiating order |
54 | Side | CHAR | Y | Side of order: 1 = Buy 2 = Sell |
38 | OrderQty | QTY | Y | Order quantity specified in the base Currency<15> or Contracts |
40 | OrdType | CHAR | Y | The following order types can be replaced: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
18 | ExecInst | MultipleValueString | N | Instructions for handling the order. 6 = Post Only |
44 | Price | PRICE | N | Order limit price. |
99 | StopPx | PRICE | C | The price at which the stop is triggered. Required for OrdType<40> = 3 (Stop Order) or = 4 (Stop Limit Order) |
59 | TimeInForce | CHAR | N | Specifies how long the order remains in effect. Absence of this field is interpreted as "Good Till Cancel". Valid values: 1 = Good Till Cancel (GTC) 3 = Immediate or Cancel (IOC) 4 = Fill or Kill (FOK) P = Post Only |
32 | LastQty | QTY | C | Quantity bought/sold on this (last) fill. |
31 | LastPx | PRICE | C | Price of this (last) fill. |
6 | AvgPx | PRICE | C | Average execution price or 0.0 if not executed yet or rejected. |
151 | LeavesQty | QTY | C | Amount of order open for further execution. If the OrdStatus 39 = 4, C, the order is no longer active and LeavesQty can = 0. Otherwise, LeavesQty = OrderQty - CumQty |
14 | CumQty | QTY | C | The cumulative quantity of an order, currently executed in a chain of partial fills. |
84 | CxlQty | QTY | C | Average execution price or 0.0 if not executed yet or rejected. |
60 | TransactTime | UTCTIMESTAMP | Y | Timestamp when the business transaction represented by the message occurred. |
12 | Commission | AMT | N | Commission amount paid (positive value) or received (negative value) for each partial fill quantity in LastQty(32). |
13 | CommType | CHAR | N | Commission Type 3 = Absolute (Total monetary amount) |
479 | CommCurrency | UTCTIMESTAMP | Y | Currency of the commission |
1003 | TradeID | STRING | N | The unique ID assigned to the trade entity once it is received or matched by the exchange or central counterparty. |
1057 | AggressorIndicator | CHAR | N | Used to identify whether the order initiator is an aggressor Y = Order initiator is aggressor N = Order initiator is passive |
Standard Trailer | Standard Trailer | Y |
OrderCancelRequest <F>
The Order Cancel Request
The request will only be accepted if the order can successfully be pulled back from the exchange floor without executing.
A cancel request is assigned a ClOrdID <11> and is treated as a separate entity. The ClOrdID <11> assigned to the cancel request must be unique amongst the ClOrdID <11> assigned to regular orders and replacement orders.
If rejected, the ClOrdID <11> of the cancel request will be sent in the Order Cancel Reject <9> message.
Either Symbol or SecurityID/SecurityIDSource must be specified
Request
8=FIX.4.4|9=163|35=F|49=1000003289|56=testnet.fix-om.equos|34=1800|52=20210910-04:45:59|11=1352951753|1=3289|37=1851685378|41=1352951752|55=ETH/USDC|54=1|60=20210317-06:12:37.000|10=161|
Response
8=FIX.4.4|9=263|35=8|49=testnet.fix-om.equos|56=1000003289|34=68|52=20210910-04:45:59.189|37=11004204402|11=1352951752|453=1|448=3289|447=D|452=36|17=0|150=4|39=4|1=3289|55=ETH/USDC|48=53|22=8|54=1|38=0.01|40=2|44=3300|99=0|59=1|32=0|31=0|151=0|14=0|6=0|60=20210910-04:45:59.186|10=209|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = F | ||
1 | Account | STRING | N | Specify valid account id for on behalf of order submission. Submitting session user should have required privilege. |
11 | ClOrdID | STRING | Y | UUID selected by client to identify the order Unique identifier for Order as assigned by the client. Uniqueness must be guaranteed across trading sessions. |
41 | OrigClOrdID | STRING | C | ClOrdID of the order to cancel (originally assigned by the client). |
37 | OrderID | STRING | C | Unique order identifier assigned by the EQONEX matching engine. |
55 | Symbol | STRING | C | EQONEX exchange Symbol, if using SecurityID/SecurityIDSource fields, set Symbol to N/A |
48 | SecurityID | STRING | C | Security identifier of the form specified SecurityIDSource<22> |
22 | SecurityIDSource | STRING | N | Identifies source of the SecurityID<48> value. M = EQONEX Instrument ID 8 = EQONEX Exchange Symbol S = Financial Instrument Global Identifier |
54 | Side | CHAR | Y | Side of order: 1 = Buy 2 = Sell |
60 | TransactTime | UTCTIMESTAMP | Y | Timestamp when the business transaction represented by the message occurred. |
Standard Trailer | Y |
OrderCancel/ReplaceRequest <G>
The order cancel/replace request is used to change the parameters of an existing order.
Do not use this message to cancel the remaining quantity of an outstanding order, use the Order Cancel Request
Cancel/Replace will be used to change any valid attribute of an open order (i.e. reduce/increase quantity, change limit price, change instructions, etc.).
The Cancel/Replace request will only be accepted if the order can successfully be pulled back from the exchange floor without executing.
Note that while it is necessary for the ClOrdID <11> to change and be unique, a new OrderID <37> field will be assigned by the Exchange if the Cancel/Replace request succeeded.
If rejected, the ClOrdID <11> of the cancel request will be sent in the Order Cancel Reject <9> message.
Order Cancel/Replace Request
Request
8=FIX.4.4|9=179|35=G|49=1000007967|56=diginex|34=806249|52=20211209-05:51:08|41=1821898271|11=1821898272|1=7967|37=3658954115|55=BTC/USDC|54=1|60=20211209-05:49:58.997|40=2|38=0.09|44=23519|59=1|10=031|
Response
8=FIX.4.4|9=268|35=8|49=diginex|56=1000007967|34=560|52=20211209-05:51:08.536|37=3658954115|11=1821898272|41=1821898271|453=1|448=7967|447=D|452=36|17=0|150=5|39=0|1=7967|55=BTC/USDC|48=52|22=8|54=1|38=0.09|40=2|44=23519|99=0|59=1|32=0|31=0|151=0.09|14=0|6=0|60=20211209-05:51:08.516|10=133|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = G | ||
11 | ClOrdID | STRING | Y | UUID selected by client to identify the order Unique identifier for Order as assigned by the client. Uniqueness must be guaranteed within a single trading session by the sender for clients who do not submit long dated orders (GTC/GTD). Clients who submit long dated orders must guarantee uniqueness across trading sessions. |
41 | OrigClOrdID | STRING | Y | ClOrdID of the order to cancel (originally assigned by the client). |
37 | OrderID | STRING | Y | Unique order identifier assigned by the EQONEX matching engine. |
1 | Account | STRING | N | Specify valid account id for on behalf of order submission. Submitting session user should have required privilege. |
55 | Symbol | STRING | C | EQONEX exchange Symbol, if using SecurityID/SecurityIDSource fields, set Symbol to N/A |
48 | SecurityID | STRING | C | Security identifier of the form specified SecurityIDSource<22> |
22 | SecurityIDSource | STRING | C | Identifies source of the SecurityID<48> value. M = EQONEX Instrument ID 8 = EQONEX Exchange Symbol S = Financial Instrument Global Identifier |
54 | Side | CHAR | Y | Side of order: 1 = Buy 2 = Sell |
44 | Price | PRICE | N | Original order price. |
38 | OrderQty | QTY | Y | Orignial order quantity specified in the base Currency<15> or Contracts |
40 | OrdType | CHAR | Y | The following order types can be replaced: 1 = Market Order 2 = Limit Order 3 = Stop Order 4 = Stop Limit Order |
99 | StopPx | PRICE | C | The price at which the stop is triggered. Required for OrdType<40> = 3 (Stop Order) or = 4 (Stop Limit Order) |
59 | TimeInForce | CHAR | N | Specifies how long the order remains in effect. Absence of this field is interpreted as "Good Till Cancel". Valid values: 1 = Good Till Cancel (GTC) 3 = Immediate or Cancel (IOC) 4 = Fill or Kill (FOK) |
60 | TransactTime | UTCTIMESTAMP | Y | Timestamp when the business transaction represented by the message occurred. |
Standard Trailer | Y |
OrderCancelReject <9>
The order cancel reject message is issued by the broker upon receipt of a cancel request or cancel/replace request message which cannot be honored. Requests to change price or decrease quantity are executed only when an outstanding quantity exists. Filled orders cannot be changed. Replacing the quantity below fill quantity will cancel the remain quantity and close the order.
When rejecting a Cancel/Replace Request (or Cancel Request), the ClOrdID <11> of the cancel/amend request will be sent in the Order Cancel Reject <9> message.
Response
8=FIX.4.4|9=153|35=9|49=testnet.fix-om.equos|56=1000003489|34=350|52=20220221-02:52:40.459|37=11273991251|11=1076751980|41=1076751978|39=0|434=2|102=99|58=Invalid price|10=088|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = 9 | ||
1 | Account | STRING | Y | Specify valid account id for on behalf of order submission. Submitting session user should have required privilege. |
37 | OrderID | STRING | Y | Unique order identifier assigned by the EQONEX matching engine. If 102 = 1 (Unknown Order), this tag 37 = NONE |
11 | ClOrdID | STRING | Y | Unique identifier for Order as assigned by the client. |
41 | OrigClOrdID | STRING | Y | ClOrdID of the order to cancel (originally assigned by the client). |
39 | OrdStatus | CHAR | Y | Identifies status of order. 0 = New 1 = Partially filled 2 = Filled 4 = Canceled 8 = Rejected C = Expired |
434 | CxlRejResponseTo | CHAR | Y | Identifies the type of request that a Cancel Reject is in response to. 1 = Order cancel request 2 = Order cancel/replace request. |
102 | CxlRejReason | CHAR | N | Code to identify reason for cancel rejection. 0 = Too late to cancel 1 = Unknown order 2 = Broker/Exchange Option 6 = Duplicate ClOrdID (11) received 8 = Price exceeds current price band 99 = Other 100 = Order not currently accessible for cancelation or modification |
58 | Text | STRING | Y | Descriptive text message elaborating on the reason of the Cancel Reject if required |
60 | TransactTime | UTCTIMESTAMP | Y | Timestamp when the business transaction represented by the message occurred. |
Standard Trailer | Y |
OrderMassCancelRequest <q>
The mass cancel request is used to submit cancels for multiple orders meeting a given criteria. This is useful to pull orders en masse from the exchange.
When executing the mass cancel, the system will not differentiate between orders submitted through FIX, REST API, and the UI. Any order captured in the scope of the mass cancel will be canceled.
The OrderMassCancelRequest will be responded with a OrderMassCancelReport detailing whether the request is successful or not, and for subsequent orders that are cancelled, individual ExecutionReports will be sent. ExecRestatementReason, tag 378, is introduced in the individual execution reports.
378=103 Mass cancelled by client
378=104 Cancel On Disconnect
Tag 11 in the individual execution report will be the clOrdId and Tag 37 will be the orderId.
Request
8=FIX.4.4|9=137|35=q|49=1000003489|56=testnet.fix-om.equos|34=816158|52=20220309-01:56:30|1=3489|11=428244534|530=1|60=20220302-02:00:22.000|55=ETH/USDC|10=189|
Response
8=FIX.4.4|9=141|35=r|49=testnet.fix-om.equos|56=1000003489|34=27|52=20220309-01:56:33.118|11=428244534|37=0|530=1|531=1|532=1|533=4|60=20220309-01:56:33.114|10=145|
8=FIX.4.4|9=270|35=8|49=testnet.fix-om.equos|56=1000003489|34=28|52=20220309-01:56:33.118|37=11278471146|11=428244533|453=1|448=3489|447=D|452=36|17=0|150=4|39=4|378=103|1=3489|55=ETH/USDC|48=53|22=8|54=1|38=0.01|40=2|44=2510|99=0|59=1|32=0|31=0|151=0|14=0|6=0|60=20220309-01:56:33.112|10=011|
...
...
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = q | ||
1 | Account | INT | Y | Specify valid account id for on behalf of order submission. Submitting session user should have required privilege. |
11 | clOrdId | STRING | Y | UUID selected by client to identify the order. Unique identifier for Order as assigned by the client. Uniqueness must be guaranteed across trading sessions. |
60 | TransactTime | UTCTIMESTAMP | Y | Timestamp when the business transaction represented by the message occurred. |
530 | MassCancelRequestType | INT | Y | Valid values: 1 = Cancel orders for a security 7 = Cancel all orders |
55 | Symbol | STRING | C | EQONEX exchange Symbol, if using SecurityID/SecurityIDSource fields, set Symbol to N/A |
22 | SecurityIDSource | STRING | C | Identifies source of the SecurityID<48> value 8 = EQONEX Exchange Symbol |
Standard Trailer | Y |
OrderMassCancelReport <r>
The OrderMassCancelReport is the response to the OrderMassCancelRequest. This generally precedes the responses of the individual cancelation execution reports, and contains information as to whether the OrderMassCancelRequest is succesful and the number of entries matched, or a reject response and text reason if it is rejected.
Response
8=FIX.4.4|9=141|35=r|49=testnet.fix-om.equos|56=1000003489|34=27|52=20220309-01:56:33.118|11=428244534|37=0|530=1|531=1|532=1|533=4|60=20220309-01:56:33.114|10=145|
Tag | Field Name | Data Type | Req | Description |
---|---|---|---|---|
Standard Header | Y | MsgType = r | ||
11 | clOrdId | STRING | UUID selected by client to identify the order. Unique identifier for Order as assigned by the client. Uniqueness must be guaranteed across trading sessions. | |
37 | OrderId | INT | ||
530 | MassCancelRequestType | INT | Valid values: 1 = Cancel orders for a security 7 = Cancel all orders |
|
531 | MassCancelResponse | CHAR | Valid values: 1 = Cancel orders for a security 7 = Cancel all orders |
|
532 | MassCancelRejectReason | CHAR | Valid values: 1 = Cancel orders for a security 7 = Cancel all orders |
|
533 | TotalAffectedOrders | INT | EQONEX exchange Symbol, if using SecurityID/SecurityIDSource fields, set Symbol to N/A | |
60 | TransactTime | UTCTimestamp | ||
Standard Trailer | Y |
FIX Drop Copy
EQONEX Dropcopy Gateway
The FIX dropcopy gateway facilitates real-time monitoring of trading activities of the associated order management FIX sessions. Carbon copies of execution reports are sent through the FIX protocol-based messaging interface.
Currently the dropcopy gateway only supports execution reports. Order acknowledgement, fills, replace/cancel acks are sent through the interface.
For the exact FIX messages please refer to the order management gateway documentation for the FIX message templates.
For institutional clients, the FIX dropcopy session associated with a given authorized person's credential will have visibility into all executions to the exchange accounts the person has TRADE rights to.
Illustrating with an example:
Assume under a given institutional entity we have have AP1 and AP2 as authorized persons and EA1 and EA2 as exchange accounts.
AP1 has TRADE rights on both EA1 and EA2. AP2 has TRADE rights on EA2.
FIX Dropcopy session under AP1's credentials will see executions flowing for both EA1 and EA2. For executions reports of EA2, these will be sent regardless of whether these are originated by AP1 or AP2.
Revision History
Date | Ver | API | End Point | Type | Description |
---|---|---|---|---|---|
2022/03/25 | 5.13 | REST | Get User Trade History |
Update | Added execType = S |
2022/03/10 | 5.13 | FIX | OrderMassCancelRequest <q> |
Update | Added tag 378 |
2022/02/23 | 5.12 | FIX | Environment Details |
Update | Updated the server addresses |
2022/02/18 | 5.12 | WSS | WSS1.1 User Orders Channel |
Update | Added orderRejectReason and orderRejectReasonEnum |
2022/02/11 | 5.12 | ALL | All | Update | API document review |
2022/01/28 | 5.12 | FIX | OrderCancelReject < 9 > |
Update | Updated the description of tag 37 |
2022/01/27 | 5.12 | WSS | WSS1.1 Available Trading Balance Channel |
Update | Added authentication using token & secret |
2022/01/27 | 5.12 | WSS | WSS1.1 User Risk Channel |
Update | Added authentication using token & secret |
2022/01/27 | 5.12 | WSS | WSS1.1 User Position Channel |
Update | Added authentication using token & secret |
2022/01/27 | 5.12 | WSS | WSS1.1 User Orders Channel |
Update | Added authentication using token & secret |
2022/01/27 | 5.12 | REST | https://eqonex.com/api/getTradeHistory |
Update | Updated the maximum number of trades |
2022/01/27 | 5.12 | FIX | Logon < A > |
Update | Added logon using token & secret |
2022/01/27 | 5.12 | REST | https://eqonex.com/api/getChart |
Update | Added optional fields, startDate and endDate |
2022/01/27 | 5.12 | REST | https://eqonex.com/api/getTransferHistory |
Update | Updated instrumentId not a required field |
2022/01/27 | 5.12 | REST | https://eqonex.com/api/getInstrumentPairs |
Update | Updated fields of response message |
2022/01/07 | 5.11 | FIX | SequenceReset < 4 > |
Update | Updated Standard Header |
2021/12/17 | 5.11 | WSS | WSS1.1 Order Book Channel |
Update | Updated level description |
2021/12/15 | 5.11 | REST | https://eqonex.com/api/getOrderBook |
Update | Added Rate Limit |
2021/12/15 | 5.11 | REST | https://eqonex.com/api/getInstruments |
Update | Added XLM instrument |
2021/12/15 | 5.11 | REST | https://eqonex.com/api/getInstrumentPairs |
Update | Added XLM instrument |
2021/12/10 | 5.10 | REST | https://eqonex.com/api/getDepositHistory |
New Feature | Added getDepositHistory endpoint |
2021/12/10 | 5.10 | FIX | OrderCancel/ReplaceRequest< G > |
New Feature | Added FIX OrderCancelReplaceRequest request (35=G) |
2021/12/10 | 5.10 | REST | https://eqonex.com/api/getFundingRateHistory |
Update | Updated startTime and endTime descriptions |
2021/12/10 | 5.10 | REST | https://eqonex.com/api/getChart |
Upate | Updated fields at the response body |
2021/12/10 | 5.10 | REST | https://eqonex.com/api/getTradeHistory |
Upate | Updated timestamp description |
2021/11/30 | 5.10 | REST | https://eqonex.com/api/sendTransferRequest |
Update | Updated the endpoint for RETAIL users only |
2021/11/18 | 5.10 | WSS | WSS1.1 User Orders Channel |
Update | Updated Replaced at execType |
2021/11/10 | 5.10 | REST | https://eqonex.com/api/getTransferHistory |
Update | Updated instrumentId to become a required field |
2021/11/09 | 5.10 | REST | https://eqonex.com/api/getUserHistory |
Update | Updated endTime required when startTime is present |
2021/11/09 | 5.10 | WSS | Websocket 1.0 | Update | Removal of WSS 1.0 -- websocket1.0 is disabled as of Nov 9 2021 |
2021/11/09 | 5.10 | FIX | MarketDataIncrementalRefresh < X > |
Update | Updated tag 269 |
2021/11/09 | 5.10 | FIX | MarketDataSnapshotFullRefresh < W > |
Update | Updated tag 269 |
2021/11/09 | 5.10 | FIX | MarketDataRequest < V > |
Update | Added 2 = Trade in tag 269 |
2021/11/09 | 5.10 | REST | https://eqonex.com/api/getUserHistory |
Update | Updated limit, format and type. Removal of userId at the Request Body |
2021/10/22 | 5.9 | FIX | MarketDataSnapshotFullRefresh < W > |
Update | Updated Tag 262 to Y |
2021/10/22 | 5.9 | FIX | MarketDataRequest < V > |
Update | Updated Tag 262 to Y |
2021/10/22 | 5.9 | REST | https://eqonex.com/api/getUserHistory |
Update | Updated orderId type to long |
2021/10/22 | 5.9 | FIX | ExecutionReport<8> |
Update | Added tag 59=P |
2021/10/22 | 5.9 | REST | https://eqonex.com/api/getPositions |
Update | Updated account field to subaccount id |
2021/10/22 | 5.9 | REST | https://eqonex.com/api/getInstruments |
Update | Added DOT instrument |
2021/10/22 | 5.9 | REST | https://eqonex.com/api/getInstrumentPairs |
Update | Added DOT instrument |
2021/10/22 | 5.9 | REST | https://eqonex.com/api/logon |
Update | Removal of userId |
2021/09/22 | 5.8 | All | All | Update | API document review |
2021/09/07 | 5.8 | REST | Rate Limit | Update | Added Rate Limit description |
2021/09/07 | 5.8 | WSS | 'WSS1.1 Order Book Channel' | Update | Updated the max depth of the order book |
2021/09/07 | 5.8 | FIX | ExecutionReport<8> |
Update | Updated tag 102's reason code 99 = Other |
2021/09/07 | 5.8 | FIX | SecurityList < y > |
Update | Updated tag 969 to FLOAT |
2021/09/01 | 5.8 | WSS | wss://eqonex.com/wsapi |
Update | Removal of login field |
2021/08/30 | 5.8 | All | All | Update | Updated Legal Disclaimer |
2021/08/30 | 5.8 | All | Code Samples |
Update | Added Code Samples page |
2021/08/23 | 5.8 | REST & FIX | https://eqonex.com/api/order NewOrderSingle <D> |
Update | MKT orders now only support IOC and FOK TIF. Lack of TIF defaults to IOC |
2021/08/23 | 5.8 | All | All | Update | General updates and corrections in wordings and json examples |
2021/08/23 | 5.8 | FIX | Update | Updated description for FIX dropcopy gateway | |
2021/08/23 | 5.8 | WSS | wss://eqonex.com/wsapi |
Update | Updated fields for cross collateral for userPositions |
2021/08/23 | 5.8 | REST | https://eqonex.com/api/getPositions |
Update | Updated fields for cross collateral |
2021/08/23 | 5.8 | REST | https://eqonex.com/api/getInstrumentPairs |
Update | Updated fields for cross collateral |
2021/08/23 | 5.8 | REST | https://eqonex.com/api/getInstruments |
Update | Updated fields for cross collateral |
2021/08/23 | 5.8 | REST | https://eqonex.com/api/getAvailableTradingQuantity |
New Feature | New API endpoint for cross collateral |
2021/08/23 | 5.8 | WSS | wss://eqonex.com/wsapi |
New Feature | New WS1.1 endpoint for cross collateral |
2021/08/13 | 5.8 | REST | https://eqonex.com/api/getRisk |
Update | Update fields in the response |
2021/08/04 | 5.6 | REST | https://eqonex.com/api/logon |
Update | Removal of userId in the logon request |
2021/08/03 | 5.6 | FIX | SSL Proxy | Update | Updated demo to testnet |
2021/07/30 | 5.6 | FIX | OrderCancelReject<9> |
Update | Added 99 error code for Tag 102 |
2021/07/28 | 5.6 | REST | https://eqonex.com/api/logon |
Update | Added 'code' in the request |
2021/07/28 | 5.6 | REST | https://eqonex.com/api/getUserHistory |
Update | Updated 'userId' to false |
2021/07/28 | 5.6 | REST | https://eqonex.com/api/cancelOrder |
Update | Added 'clOrdId' in the response |
2021/07/22 | 5.6 | REST | https://eqonex.com/api/userTrades |
Update | Added a 'limit' field |
2021/07/22 | 5.6 | REST | https://eqonex.com/api/getDepositAddresses |
Update | Updated instrumentId to 'True' |
2021/07/22 | 5.6 | FIX | OrderCancelRequest < F > |
Update | Update tag 54's Req to Y |
2021/06/25 | 5.5 | REST | https://eqonex.com/api/order |
Update | Removal of isHidden |
2021/06/25 | 5.5 | WSS | wss://eqonex.com/wsapi |
Update | Replaced 'products' with 'types' |
2021/06/25 | 5.5 | WSS | wss://eqonex.com/wsapi |
New Feature | Added Websocket 1.1 API on Production |
2021/06/16 | 5.5 | All | All | Update | EQONEX rebranding update |
2021/06/11 | 5.5 | REST | https://equos.io/api/getOrders |
Update | Removal of orderStatus=8 (rejected) |
2021/06/11 | 5.5 | REST | https://equos.io/api/userTrades https://equos.io/api/getOrders https://equos.io/api/getOrderStatus https://equos.io/api/getOrderHistory |
New Feature | Added an Error Code, 429, when reaching the rate limit |
2021/06/11 | 5.5 | REST | https://equos.io/api/getOrders |
Update | Removal of execType |
2021/06/11 | 5.5 | REST | https://equos.io/api/userTrades https://equos.io/api/getOrders https://equos.io/api/getOrderStatus https://equos.io/api/getOrderHistory |
New Feature | Added pagination and Rate Limit |
2021/06/11 | 5.5 | REST | https://equos.io/api/sendTransferRequest |
New Feature | Added REST API sendTransferRequest |
2021/06/11 | 5.5 | REST | https://equos.io/api/getPositions |
Enhancement | added availableTransferQuantity |
2021/06/11 | 5.5 | REST | https://equos.io/api/getOpenOrders |
New Feature | Added new endpoint for getting open orders |
2021/05/27 | 5.5 | WSS | wss://testnet.equos.io/wsapi |
New Feature | Added Websocket 1.1 API on Testnet |
2021/05/27 | 5.5 | FIX | NewOrderSingle< D > |
Enhancement | Added Stop Order request (847=150) |
2021/04/14 | 5.4 | FIX | OrderMassCancelRequest <q> |
New Feature | Added FIX OrderMassCancelRequest request (35=q) |
2021/04/14 | 5.4 | FIX | OrderMassCancelReport <r> |
New Feature | Added FIX OrderMassCancelReport request (35=r) |
2021/04/11 | 5.3 | FIX | OrderCancelReplaceRequest<G> |
Updates | Removed FIX OrderCancelReplaceRequest request (35=G) for a revamp and to be launched in Q2 2021 |
2021/04/08 | 5.2 | REST & WSS | RESThttps://trade.equos.io/api/cancelReplaceOrder WSS wss://equos.io/ws/userorders |
Updates | EQO token update, CFI codes and MIC update in instrument data Removed cancelReplaceOrder REST API for a revamp and to be launched in Q2 2021; removed type in response in wss/userOrders |
2021/03/17 | 5.1 | FIX | FIX https://developer.equos.io/#ordercancelrequest-lt-f-gt |
Feature Update | FIX OrderCancelRequest OrderId<37> optional field |
2021/02/03 | 5.0 | REST | REST https://equos.io/api/sendWithdrawRequest https://equos.io/api/getTransferHistory https://equos.io/api/getUserHistory https://equos.io/api/cancelOrder https://equos.io/api/userTrades https://equos.io/api/cancelAll |
New Features and updates | Updates for crypto withdrawal endpoint and order endpoints |
2021/01/12 | 4.13 | REST & WSS | REST https://equos.io/api/getRisk WSS wss://equos.io/ws/userrisk wss://equos.io/ws/userorders wss://equos.io/ws/userposition |
Updates | Updated mandatory fields for Institutional User |
2021/01/11 | 4.12 | REST & FIX | REST https://equos.io/api/getRisk wss://equos.io/ws/userrisk https://equos.io/api/getOrderStatus FIX MarketDataRequest < V > |
Updates | REST updated api/getRisk wss/userrisk api/getOrderStatus( removed old endpoint /getOrder) FIX updated MDEntryType<269> |
2021/01/08 | 4.11 | REST & WSS | https://equos.io/api/userTrades https://equos.io/api/getInstrumentPairs https://equos.io/api/getRisk wss://equos.io/ws/userrisk https://equos.io/api/getOrder https://equos.io/api/getInstruments https://equos.io/api/getInstrumentPairs https://equos.io/api/getOrderBook https://equos.io/api/getTradeHistory https://equos.io/api/getChart |
Updates | updates to api/userTrades and updates to getInstrumentPairs with example for Perpetuals |
2020/12/24 | 4.10 | REST | https://equos.io/api/health https://equos.io/api/getOrderStatus |
New Feature and updates | New API health check endpoint and api/getOrderStatus endpoint |
2020/11/24 | 4.9 | WSS | wss://equos.io/ws/ticker wss://equos.io/ws/orderbook wss://equos.io/ws/tradehistory wss://equos.io/ws/chart https://equos.io/api/userTrades |
New Feature | Public Websocket endpoints with Unsubscribe and updates on description of the FIX and REST endpoints and examples. |
2020/09/20 | 4.8 | WSS | wss://equos.io/ws/ticker |
New Feature | Ticker Endpoint |
2020/09/05 | 4.7 | REST | GET https://equos.io/api/getFundingRateHistory |
New Feature | Perpetual Funding Rate History |
2020/09/05 | 4.7 | REST | POST https://equos.io/api/getUserHistory |
New Feature | User History Reports supporting Order, Trade, Funding History, Position |
2020/08/25 | 4.6 | REST | GET https://equos.io/api/getInstrumentPairs |
Enhancement | Expanded reference data fields to support Perpetuals, Futures & Options |
2020/08/25 | 4.6 | WSS | wss://equos.io/ws/orderbook |
Enhancement | Expanded fields for perpetual contract data |
2020/08/25 | 4.6 | REST | POST https://equos.io/api/order |
Enhancement | Wait for orderId from matching engine control flag added |
2020/08/06 | 4.5 | REST/WS | Python Sample Codes for REST / WS and Up to date REST / WS / FIX API documents | Enhancement | Python Sample Codes added for REST / WS APIs and Updated REST/WS/FIX APIs documentation |
2020/07/28 | 4.4 | REST/WS | GET https://equos.io/api/userTrades wss://equos.io/ws//userTrades |
Enhancement | Average execution price added |
2020/07/21 | 4.2.7 | REST/WS | GET https://equos.io/api/getTradeHistory wss://equos.io/ws/tradehistory |
Enhancement | AggressorSide added to tradeHistory endpoint |
2020/06/17 | 4.2 | FIX | ExecutionReport<8> |
Enhancement | Commission fields added to ExecutionReport |
2020/05/15 | 3.10 | All | All | New Feature | USD/USDC Book consolidation |
2020/05/15 | 3.10 | All | All | System Change | USD Instruments removed from the trading list |
2020/05/15 | 3.10 | REST | New https://equos.io/api/ Legacy https://trade.equos.io/api/ |
System Change | Endpoint URL change |
2020/05/06 | 3.02 | FIX | Logon<1> |
New Feature | Cancel on Disconnect |
2020/04/28 | 3.00 | ccxt | github developer resources | New Feature | ccxt API support released |
2020/04/06 | 2.20 | REST | POST https://trade.equos.io/api/logon POST https://trade.equos.io/api/order POST https://trade.equos.io/api/cancelOrder POST https://trade.equos.io/api/cancelReplaceOrder POST https://trade.equos.io/api/getOrders POST https://trade.equos.io/api/getOrder POST https://trade.equos.io/api/getPositions POST https://trade.equos.io/api/getRisk |
Update | Institutional/multiple account support in REST |
2020/03/27 | 2.00 | All | EQONEX developer documentation site | Initial | Document Release |