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 |
Request Body
{"instrumentId"=>"963", "type"=>"Block", "price"=>"1234", "quantity"=>"0.2", "buy"=>{"mpId"=>"2087505339", "accountType"=>"Client", "parties"=>[{"id"=>"ABC", "source"=>"D", "role"=>"38"}]}, "sell"=>{"mpId"=>"2087505348", "accountType"=>"House", "parties"=>[{"id"=>"12345", "source"=>"D", "role"=>"38"}]}}
RESPONSES
status: OK
{"tradeId":"16"}