Create a p2p limit order

You can notice the difference between p2p and normal limit orders by looking at the path.

POST /ft/p2p/:chainId/

Examples

The process of composing the order and the payload to POST to API endpoint is pretty much the same as with usual non-p2p orders.

The only differences are:

curl -X POST \
  'https://api.paraswap.io/ft/p2p/1' \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "nonceAndMeta": "1490585846052014974250870934243084527261268076495",
  "expiry": 1665493373,
  "makerAsset": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
  "takerAsset": "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39",
  "maker": "0xB4E6f1c1f9Ba3aD97e09603966b4ac773303a8d1",
  "taker": "0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57",
  "makerAmount": "1000000000000000000",
  "takerAmount": "8000000000000000000",
  "signature": "0x1647ae642db6e02c39ac80f40b73df032ca43648c2d11c44d5c7437e0c3a151739e54b7d3ea22067226b723ac84ac577a487579b04e7197bc3b13abee5d3952a1c"
}'

Query parameters:

  • chainId:network id (Ethereum Mainnet = 1)

Body parameters

Important notice:

  • nonceAndMeta: needs to be encoded as described in (here we are in the p2p case so we should add the address of the person you want to execute a trade in nonceAndMeta):

Data structure in our centralized systemchevron-right

Response

Understand the response by checking our dedicated page:

Data structure in our centralized systemchevron-right

Last updated