Get order by the specified order hash

GEThttps://api.1inch.com/orderbook/v4.1/{chain}/order/{orderHash}
Supported on:
EthereumBaseBNB ChainArbitrumAvalancheCronosZKsyncGnosisHyperEVMArcMonadOptimismPolygonLineaSonicUnichainRobinhood

Parameters

chain
* number path
orderHash
* string path

Request Body

This request doesn’t have any request body.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const axios = require('axios');

async function httpCall() {
  const url = 'https://api.1inch.com/orderbook/v4.1/{chain}/order/{orderHash}';

  const config = {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
    },
    params: {},
    paramsSerializer: {
      indexes: null,
    },
  };

  try {
    const response = await axios.get(url, config);
    console.log(response.data);
  } catch (error) {
    console.error(error);
  }
}

Returns

GetOrderByHashV4_1Response object
orderHash
* string
createDateTime
* string
signature
* string
orderStatus
* number (Enum)
1
2
3
4
5
6
remainingMakerAmount
* string
makerBalance
* string
makerAllowance
* string
data
* any
allOf[0]
LimitOrderV4Data object
makerAsset
* string
takerAsset
* string
maker
* string
receiver
string
makingAmount
* string
takingAmount
* string
salt
* string
extension
string
makerTraits
string
makerRate
* string
takerRate
* string
orderInvalidReason
* string
isMakerContract
* boolean
events
* array
items
LimitOrderEventV4Response object
id
* number
version
* number
action
* string (Enum)
fill
cancel
orderHash
* string
taker
* string
amount
* string
transactionHash
* string
blockNumber
* number
createDateTime
* string
partialFillsAllowed
* boolean
statusInfo
* any
allOf[0]
OrderStatusInfoResponse object
statuses
* array
items
number (Enum)
0
1
2
3
data
* any
allOf[0]
StatusDataResponse object
loss
number
JSON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  "orderHash": "0xd6745a6bbdf1f1ac73c4f7bef54ecfc56fee1acc900bde9b00dd17f5f19a37c9",
  "createDateTime": "2023-06-26T10:30:06.465Z",
  "signature": "0xb8406ca79f313de982e927a4ca98a1751dc968ce56186854ec92a8004c701a2671b0b23bff972d81dcda081a7fcb768b1b2aa728987e005e8f47e3861a7550f71b",
  "orderStatus": 1,
  "remainingMakerAmount": "809906760854554700000000000000",
  "makerBalance": "280674481722926709367228622156",
  "makerAllowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
  "data": {
    "makerAsset": "string",
    "takerAsset": "string",
    "maker": "string",
    "receiver": "0x0000000000000000000000000000000000000000",
    "makingAmount": "string",
    "takingAmount": "string",
    "salt": "string",
    "extension": "0x",
    "makerTraits": "0"
  },
  "makerRate": "0.000000000123471003",
  "takerRate": "8099067608.545547000000000000",
  "orderInvalidReason": null,
  "isMakerContract": false,
  "events": [
    {
      "id": 1,
      "version": 4,
      "action": "fill",
      "orderHash": "0xd6745a6bbdf1f1ac73c4f7bef54ecfc56fee1acc900bde9b00dd17f5f19a37c9",
      "taker": "0x1234567890123456789012345678901234567890",
      "amount": "500000000000000000",
      "transactionHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
      "blockNumber": 12345678,
      "createDateTime": "2023-06-26T10:30:06.465Z"
    }
  ],
  "partialFillsAllowed": true,
  "statusInfo": {
    "statuses": [],
    "data": {
      "loss": 15.5
    }
  }
}

Did you find what you need?