Helpdesk
  • Overview
    • Welcome to Finery Markets
    • About Our Products
      • FM Liquidity Match
        • Master Account
        • Sub-Account
      • FM Pulse
      • White Label solution
  • Product Features
    • Onboarding
    • Risk Management
    • Trading
      • Aggregated Order Book
      • Firm Order Book
      • Pending Limit Orders (GTC)
      • RFQ
      • Toxic Flow Protection
      • Markups
      • Authorized trading
      • Non-Deliverable Trading
      • Voice Trading
      • Interdealer Trading
    • Position Management
    • Settlements
      • Automated Settlements
      • Addresses
    • Control Center
      • Multi-Roles
      • Notifications
      • Reporting
      • Bulk Edit
    • Referral program
  • API Reference
    • Quick Start with API
      • For Market Makers
      • For Takers
    • Data Types
    • REST API
      • Client management
        • getSubaccounts
      • RFQ
        • getSettings
        • getSettings (authorized)
        • getUserSettings (authorized)
        • setUserSettings (authorized)
        • getProviders
        • getSessions
      • Trading
        • add
        • add (authorized)
        • Pending limit orders
          • add (pending limit order)
          • add (pending limit order) (authorized)
          • del
          • del (authorized)
          • delAll
          • delAll (authorized)
          • orders
          • orders (authorized)
        • mod
        • del
        • delAll
        • book
        • voiceTrade
        • liquidationTrade
        • dealHistory
        • dealHistory (authorized)
        • instruments
        • positions
        • instrumentMarkups
        • addInstrumentMarkups
        • delInstrumentMarkups
      • Settlements
        • settlementRequests
        • settlementOrders
        • settlementTransactions
        • settlementHistory
        • settlementTransactionHistory
        • addIncomingSettlementRequest
        • delIncomingSettlementRequest
        • delIncomingSettlementCPRequest
        • addOutgoingSettlementTransaction
        • addIncomingSettlementTransaction
        • sendSettlementTransaction
        • commitIncomingSettlementTransaction
        • delSettlementTransaction
      • Risk Management
        • climits
        • setCLimit
        • delCLimit
        • subaccountsLimits
        • setSubaccountLimit
        • delSubaccountLimit
        • enableTrading
        • disableTrading
        • cAssetLimits
        • setCAssetLimit
        • delCAssetLimit
        • cShortSalesBan
        • setShortSalesBan
        • delShortSalesBan
        • enableInstrumentsWhitelist
        • setInstrumentsWhitelist
        • disableInstrumentsWhitelist
        • instrumentsWhitelist
      • Non-deliverable Trading
        • settings/getOvernightRates
        • settings/setOvernightRates
    • Websocket API
      • Feed 'A' - Assets
      • Feed 'P' - Positions
      • Feed 'L' - Counterparty limits
      • Feed 'B' - Global order books
      • Feed 'F' - Tradable order books
      • Feed 'R' - Settlement requests
      • Feed 'N' - Settlement transactions
      • Feed 'K' - Positions
      • Feed 'O' - Orders
      • Feed 'S' - Settlement orders
      • RFQ
    • FIX API
      • Admin messages
      • Market Data
      • Trade
        • Trading for Takers
        • Trading for LPs and Masters
    • Troubleshooting Errors
      • List of Error Codes
      • Error 3
      • Error 6
      • Error 7
      • Error 14
Powered by GitBook
On this page
  1. API Reference
  2. REST API
  3. Trading

dealHistory

Returns deal history.

If the number of deals in the specified period may exceed the limit, the request returns 250 latest deals. To get other deals, a user needs to remember the earliest DealId and specify it in the next request(s).

POST api/dealHistory

{
    "instrument": "BTC-USD",
    "filter": "all"
}
[
    [
        "BTC-USD",       // Instrument name
        0,               // Order type
        0,               // Side
        0,               // Cancel reason
        1234,            // Order id
        0,               // Client order id
        9900000000,      // Order price
        10000000,        // Order initial size or volume
        9998000,         // Remaining order size or volume
        1558051200000,   // Order created at
        1558052600000,   // Deal moment
        12,              // Deal id
        1,               // Deal aggressor side
        9900000000,      // Deal price
        2000,            // Deal size
        19800000000000,  // Deal volume
        100000,          // Deal delta
        10,              // Taker order owner id
        1,               // By size or by volume
        0,               // Deal type
        15,              // Maker order owner id
        0                // Liquidity source
    ]
]
{
    "error": 2
}

Request parameters

Field name
Type
Description

instrument

Array <string>

Instrument names.

If specified only return deals for these instruments

counterpartyIds

Array Efx::ClientId

Counterparty Ids. If specified only return deals for these counterparties

filter

string

Optional field for master accounts only (FM Liquidity Match). - absent or "all": returns full deals history - "subaccounts": returns deals history with subaccounts - "external": returns deals history with external counterparties

till

Efx::DealId

If specified only return deals with lesser ID

from

Efx::Timestamp

If specified only return deals with equal or greater timestamp

to

Efx::Timestamp

If specified only return deals with lesser timestamp

limit

unsigned int16

Default: 250

Maximum number of deals to return (capped at 250)

Response description

Feild name
Type
Description

Array of Deals

Deal

Array[21]

0

string

Instrument name

1

unsigned int16

Order Type

0 - limit

1 - post only

2 - limit IOC

3 - limit FOK

4 - market IOC

5 - market FOK 6 - manual trade 7 - pending limit 9 - RFQ

2

Efx::Side

Side

0 - bid

1 - ask

3

unsigned int16

Cancel reason

0 - in place or filled

1 - by client

2 - as non-book order

3 - by self-trade prevention

4 - cancel-on-disconnect

4

Efx::OrderId

Order id

5

Efx::ClientOrderId

Client order id

6

Efx::Price

Order price

7

Efx::Size

Order Initial Size Or Volume (depending on whether order was initiated by volume)

8

Efx::Size

Remaining Order Size Or Volume after deal (depending on whether order was initiated by volume)

9

Efx::Timestamp

Order Created At

10

Efx::Timestamp

Deal Moment

11

Efx::DealId

Deal id

12

Efx::Side

Deal aggressor side

0 - bid

1 - ask

13

Efx::Price

Deal price

14

Efx::Size

Deal size

15

Efx::Size

Deal volume

16

Efx::Size

Deal delta in quote (balance) currency

17

Efx::ClientId

Counterparty id

18

unsigned int16

If order was created by size or by volume

0 - by size

1 - by volume

19

Efx::ClientId

Id of a taker who placed the order

20

Efx::DealId

Deal ID current deal is linked to. Deals can be linked when trade happens through the master's account.

21

DealType

0 - regular 1 - authorized trade 2 - liquidation trade

22

Efx::ClientId

Id of a maker who placed the order

23

Efx::LiquiditySource

Source of the liquidity for the deal

PreviousliquidationTradeNextdealHistory (authorized)

Last updated 1 month ago