Trades

trades InjectiveDerivativeExchangeRPC

get

Trades gets the trades of a Derivative Market.

Query parameters
marketIdstring · min: 66 · max: 66Optional

MarketId of the market's orderbook we want to fetch

Example: 0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bbPattern: ^0x[0-9a-fA-F]{64}$
marketIdsstring[] · max: 100Optional

MarketIds of the markets of which we want to get trades

Example: ["0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce","0x1f73e21972972c69c03fb105a5864592ac2b47996ffea3c500d1ea2d20138717"]
executionSidestring · enumOptional

Filter by execution side of the trade

Example: makerPossible values:
directionstring · enumOptional

Filter by direction the trade

Example: buyPossible values:
skipintegerOptional

Skip will skip the first n item from the result

Example: 0
limitinteger · int64Optional

Limit is used to specify the maximum number of items to be returned.

Example: 100
startTimeinteger · int64Optional

The starting timestamp in UNIX milliseconds that the trades must be equal or older than

Example: 1645579770
endTimeinteger · int64Optional

The ending timestamp in UNIX milliseconds that the trades must be equal or younger than

Example: 1645579787
subaccountIdsstring[] · max: 100Optional

Subaccount ids of traders we want to get trades. Use this field for fetching trades from multiple subaccounts

Example: ["0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000001","0x80f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000000"]
subaccountIdstring · min: 66 · max: 66Optional

SubaccountId of the trader we want to get the trades from

Example: 0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002Pattern: ^0x[0-9a-fA-F]{64}$
tradeIdstringOptional

Filter by the tradeId of the trade

Example: 502733_0_0
accountAddressstring · min: 42 · max: 42Optional

Account address

Example: inj1cml96vmptgw99syqrrz8az79xer2pcgp0a885rPattern: ^inj1[0-9a-zA-Z]{38}$
cidstringOptional

Client order ID

Example: my_custom_cid
Responses
200
OK response.
application/json
get
GET /api/exchange/derivative/v1/trades HTTP/1.1
Host: inj-indexer.nownodes.io
Accept: */*
{
  "paging": {
    "countBySubaccount": 3144167030999342600,
    "from": 1916499695,
    "next": [
      "Ea rerum.",
      "Aut dolorem cum voluptas quae.",
      "Voluptas repellendus qui ipsam est."
    ],
    "to": 391437627,
    "total": 7364854934794692000
  },
  "trades": [
    {
      "cid": "custom_cid",
      "executedAt": 1544614248000,
      "executionSide": "Et quae perferendis assumenda.",
      "fee": "150428.571428571428571429",
      "feeRecipient": "inj15gnk95hvqrsr343ecqjuv7yf2af9rkdqeax52d",
      "isLiquidation": false,
      "marketId": "0xb6fa659501d170f3bfbbc16f9e3e46e8435d3b13cb2ceeed5945ddd16df435ef",
      "orderHash": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
      "payout": "0",
      "positionDelta": {
        "executionMargin": "50000000",
        "executionPrice": "12535714.285714285714285714",
        "executionQuantity": "6",
        "tradeDirection": "buy"
      },
      "subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
      "tradeExecutionType": "market",
      "tradeId": "Est tempore error perspiciatis."
    },
    {
      "cid": "custom_cid",
      "executedAt": 1544614248000,
      "executionSide": "Et quae perferendis assumenda.",
      "fee": "150428.571428571428571429",
      "feeRecipient": "inj15gnk95hvqrsr343ecqjuv7yf2af9rkdqeax52d",
      "isLiquidation": false,
      "marketId": "0xb6fa659501d170f3bfbbc16f9e3e46e8435d3b13cb2ceeed5945ddd16df435ef",
      "orderHash": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
      "payout": "0",
      "positionDelta": {
        "executionMargin": "50000000",
        "executionPrice": "12535714.285714285714285714",
        "executionQuantity": "6",
        "tradeDirection": "buy"
      },
      "subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
      "tradeExecutionType": "market",
      "tradeId": "Est tempore error perspiciatis."
    },
    {
      "cid": "custom_cid",
      "executedAt": 1544614248000,
      "executionSide": "Et quae perferendis assumenda.",
      "fee": "150428.571428571428571429",
      "feeRecipient": "inj15gnk95hvqrsr343ecqjuv7yf2af9rkdqeax52d",
      "isLiquidation": false,
      "marketId": "0xb6fa659501d170f3bfbbc16f9e3e46e8435d3b13cb2ceeed5945ddd16df435ef",
      "orderHash": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
      "payout": "0",
      "positionDelta": {
        "executionMargin": "50000000",
        "executionPrice": "12535714.285714285714285714",
        "executionQuantity": "6",
        "tradeDirection": "buy"
      },
      "subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
      "tradeExecutionType": "market",
      "tradeId": "Est tempore error perspiciatis."
    },
    {
      "cid": "custom_cid",
      "executedAt": 1544614248000,
      "executionSide": "Et quae perferendis assumenda.",
      "fee": "150428.571428571428571429",
      "feeRecipient": "inj15gnk95hvqrsr343ecqjuv7yf2af9rkdqeax52d",
      "isLiquidation": false,
      "marketId": "0xb6fa659501d170f3bfbbc16f9e3e46e8435d3b13cb2ceeed5945ddd16df435ef",
      "orderHash": "0x3bdb3d8b5eb4d362371b72cf459216553d74abdb55eb0208091f7777dd85c8bb",
      "payout": "0",
      "positionDelta": {
        "executionMargin": "50000000",
        "executionPrice": "12535714.285714285714285714",
        "executionQuantity": "6",
        "tradeDirection": "buy"
      },
      "subaccountId": "0x90f8bf6a479f320ead074411a4b0e7944ea8c9c1000000000000000000000002",
      "tradeExecutionType": "market",
      "tradeId": "Est tempore error perspiciatis."
    }
  ]
}