Logo
Admin API API Documentation

Trade Entry

POST {{URL_ORIGIN}}/api/operations/enter-trade

Trade Entry API allows you to capture trade that was done out of the order book

Trade Entry- Fields

Field Type Description
instrumentId Int Instrument id for the trade
type eNum Block/ EFRP/ Other

of the trade
price Decimal Trade price
quantity Decimal Trade quantity
buy Side obj See below
sell Side obj See below
Side obj-
Field Type Description
mpId Int mpId
accountType eNum Client/House
parties []obj list of parties obj
parties obj-
Field Type Description
id string(20) The Id of the party
source Char Id source = D
role int Id role = 38

Trade Entry- Error Codes

Code Message
1 System is unavailable
100 Missing or invalid parameter: [FieldName]
100 Trade [FieldName] must be less than [maxLong/10^ fieldPrecision
100 Trade [FieldName] must be above than [minLong/10^ fieldPrecision]
101 [FieldName] not found
102 Market is closed
102 Currently not allowed
102 Trading is not allowed during auction call
102 Trading is not allowed during crossing
102 Instrument trading is not allowed
102 Price precision is[PricePrecision]
102 Quantity precision is[QuantityPrecision]
102 Minimum trade quantity is [MinQuantity]
NEW 102 MinQuantity = max( minQuantity,
minQuantityTradeEntry.amount)
102 Maximum trade quantity is [MaxQuantity]
102 Quantity increment is [quantityIncrement]
102 Instrument trading is halted
102 Price breaches [FieldName] of [FieldValue]
102 Maximum value is [maxOrderValue]
102 Price tick size is [tickSize]
102 Trading is not allowed
102 Missing position account
10001 Permission denied

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 




RESPONSES

status OK

{ "id": "285", "data": { "instrumentId": "239", "type": "Block", "price": "1234", "quantity": "10", "buy": { "mpId": "15", "accountType": "Client", "parties": [ { "id": "ABC", "source": "D", "role": "38" } ] }, "sell": { "mpId": "15", "accountType": "House", "parties": [ { "id": "12345", "source": "D", "role": "38" } ] } }, "requestType": "TradeEntry", "name": "INS1", "status": "Pending", "makerComment": "New trade entry", "makerUserId": "auth0|6310aa4ba8cae50015ee3678", "timestamp": "2024-02-29T09:37:20.237" }



Curl
curl -X POST 'URL_ORIGIN/api/operations/enter-trade' -d '{"instrumentId":"123","type":"Block","price":"1234","quantity":"10","buy":{"mpId":"10","accountType":"Client","parties":[{"id":"ABC","source":"D","role":"38"}]},"sell":{"mpId":"11","accountType":"House","parties":[{"id":"12345","source":"D","role":"38"}]},"comment":"New trade entry"}'

ENDPOINTS