Include a limit order to the 1inch limit orders database

You can send your limit orders to the 1inch database and then your order will participate in the 1inch aggregation protocol.

POSThttps://api.1inch.com/orderbook/v4.1/{chain}
Supported on:
EthereumBaseBNB ChainOptimismPolygonLineaSonicUnichainArbitrumAvalancheZKsyncGnosis

Parameters

chain
* number path

Request Body

LimitOrderV4Request object
orderHash
* string
signature
* 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
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
const axios = require('axios');

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

  const config = {
    headers: {
      Authorization: `Bearer ${API_KEY}`,
    },
    params: {},
    paramsSerializer: {
      indexes: null,
    },
  };
  const body = {
    orderHash: 'string',
    signature: 'string',
    data: {
      makerAsset: 'string',
      takerAsset: 'string',
      maker: 'string',
      receiver: '0x0000000000000000000000000000000000000000',
      makingAmount: 'string',
      takingAmount: 'string',
      salt: 'string',
      extension: '0x',
      makerTraits: '0',
    },
  };

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

Returns

201
400
403
LimitOrderV4Response object
success
* boolean
JSON
1
2
3
4
{
  "success": false
}

Did you find what you need?