Get NFT orders by taker
GET /ft/orders/:chainId/taker/:address
Examples
curl -X GET \
'https://api.paraswap.io/nft/orders/137/taker/0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf'
/* eslint-disable @typescript-eslint/no-unused-vars */
import axios from 'axios';
import {
constructPartialSDK,
constructAxiosFetcher,
constructGetNFTOrders,
} from '..';
const fetcher = constructAxiosFetcher(axios);
const paraSwapLimitOrderSDK = constructPartialSDK(
{
chainId: 137,
fetcher,
},
constructGetNFTOrders
);
async function run() {
const orders = await paraSwapLimitOrderSDK.getNFTOrders({
taker: '0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf',
type: 'LIMIT',
});
console.log('orders', orders);
}
run();
GET /ft/p2p/:chainId/taker/:address (for p2p)
Examples
curl -X GET \
'https://api.paraswap.io/nft/p2p/137/taker/0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf'
/* eslint-disable @typescript-eslint/no-unused-vars */
import axios from 'axios';
import {
constructPartialSDK,
constructAxiosFetcher,
constructGetNFTOrders,
} from '..';
const fetcher = constructAxiosFetcher(axios);
const paraSwapLimitOrderSDK = constructPartialSDK(
{
chainId: 137,
fetcher,
},
constructGetNFTOrders
);
async function run() {
const orders = await paraSwapLimitOrderSDK.getNFTOrders({
taker: '0x05182E579FDfCf69E4390c3411D8FeA1fb6467cf',
type: 'P2P',
});
console.log('orders', orders);
}
run();
Query parameters:
chainId:
network id (Ethereum Mainnet = 1).address: will return you the orders in which
taker == address
.
Response
Understand the response by checking our dedicated page:
Data structure in our centralized system{
"orders": [
{
"expiry": 1664717831,
"createdAt": 1663853865,
"transactionHash": null,
"chainId": 137,
"nonceAndMeta": "5849534550391847890058685755479665482115680361250527628888286063",
"maker": "0x05182e579fdfcf69e4390c3411d8fea1fb6467cf",
"taker": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"takerFromMeta": "0x6dac5cac7bbcce4db3c1cc5c8fe39dcdde52a36f",
"makerAsset": "0xcd494673999194365033d7a287af9f0a3b163874",
"makerAssetId": "1027",
"makerAssetType": 2,
"takerAsset": "0xad6d458402f60fd3bd25163575031acdce07538d",
"takerAssetId": "0",
"takerAssetType": 0,
"makerAmount": "1",
"fillableBalance": "1",
"takerAmount": "50",
"signature": "0xdb265004d19c79b2284ae327c586725c7f3535eeb1693d166a727d62efd521304874b658d106ca552f09352effa34be72826e2abdf6c6b09591318199eeb16081b",
"orderHash": "0x33c5ca652106ef8340673b01e2ab8a713837bf42c2b3bef67143b65f9b89934c",
"permitMakerAsset": null,
"type": "P2P",
"state": "PENDING"
}
]
}{
"limit": 2,
"offset": 0,
"orders": [
{
"expiry": 0,
"createdAt": 1661162877,
"updatedAt": 1661162877,
"transactionHash": null,
"chainId": 137,
"nonceAndMeta": "7433034152904838547212883274543254857465784035140417181410394112",
"maker": "0x05182e579fdfcf69e4390c3411d8fea1fb6467cf",
"taker": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"takerFromMeta": "0x0000000000000000000000000000000000000000",
"makerAsset": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
"takerAsset": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
"makerAmount": "10000000000000000",
"fillableBalance": "10000000000000000",
"swappableBalance": "0",
"makerBalance": "10000000000000000",
"isFillOrKill": false,
"takerAmount": "7775870000000000",
"signature": "0x43dd8dbc8228594171d0ed3e633ca0eb5c24f46bf0575100623ae56723712f807ecaf7dc8edfcf0d4517f80f11bf016bde0a9a20e243eea2bb32e55eadbb6b0d1b",
"orderHash": "0xdef400fd95d028d8caaba2c4887d2694563e0bc7f73c17d747feac2e24ed411d",
"permitMakerAsset": null,
"type": "LIMIT",
"state": "PENDING"
},
{
"expiry": 0,
"createdAt": 1661102635,
"updatedAt": 1661162851,
"transactionHash": "0x235aaa8472de0a724ea09daee5f2ed57d4365753d521008bcd9550d83a4461c7",
"chainId": 137,
"nonceAndMeta": "5138925241883764339325856218512467102197816820790096695352360960",
"maker": "0x05182e579fdfcf69e4390c3411d8fea1fb6467cf",
"taker": "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
"takerFromMeta": "0x0000000000000000000000000000000000000000",
"makerAsset": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
"takerAsset": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",
"makerAmount": "1000000",
"fillableBalance": "27806",
"swappableBalance": "27806",
"makerBalance": "27806",
"isFillOrKill": false,
"takerAmount": "999800000000000000",
"signature": "0x98e2cbd4e56290665c8301b7fd8b2590ce4d1e46fa674be601efef48f07599bf7f5cd7b1dc95653a3736bf06da0a41f251f85546ebe72491cd21a240b70ef66f1c",
"orderHash": "0xef9fdf84be98cc70c05dbfe62af88412c1231f3025d3c829cf93b29f578a66fd",
"permitMakerAsset": null,
"type": "LIMIT",
"state": "CANCELLED"
}
]
}
Last updated