Trades
List of NFT Exchange Trade Endpoints
All Trades
/auctions
GET https://explorer.protokol.sh/api/nft/exchange/trades 
Returns all trade transactions
Query Parameters
page
integer
The number of the page that will be returned
limit
integer
The number of resources per page
orderBy
string
Order by specific parameter (asc or desc) Example: orderBy=id:asc
transform
boolean
Returns modified or raw data
{
  "meta": {
    "totalCountIsEstimate": true,
    "count": 1,
    "pageCount": 1,
    "totalCount": 1,
    "next": null,
    "previous": null,
    "self": "/nft/exchange/trades?transform=true&page=1&limit=100",
    "first": "/nft/exchange/trades?transform=true&page=1&limit=100",
    "last": "/nft/exchange/trades?transform=true&page=1&limit=100"
  },
  "data": [
    {
      "id": "56d68daa8eaa9182fa0dc4d7b484247bc2f4c2e5ead6911d8ccc0f79d4c2876c",
      "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "completedTrade": {
        "auctionId": "91221ffc0838fde5983e5ffe32c427b5720dc5703df6b89f1126fa7f62ebd964",
        "bidId": "ce81232de97526c7be16dc66f7efba4f8f92a686e8b8d1250f48a87dacd45945"
      },
      "timestamp": {
        "epoch": 143238352,
        "unix": 1633339552,
        "human": "2021-10-04T09:25:52.000Z"
      }
    }
  ]
}Examples
curl https://explorer.protokol.sh/api/nft/exchange/tradesconst response = connection.NFTExchangeApi("trades").all();
>>> Promise<ApiResponse<TradesResource>>Trade By Id
/trades/:id
GET https://explorer.protokol.sh/api/nft/exchange/trades/:id 
Returns trade by id
Path Parameters
id
string
The identifier of the trade to be retrieved
Query Parameters
transform
boolean
Returns modified or raw data
{
  "data": {
    "id": "56d68daa8eaa9182fa0dc4d7b484247bc2f4c2e5ead6911d8ccc0f79d4c2876c",
    "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
    "completedTrade": {
      "auction": {
        "id": "91221ffc0838fde5983e5ffe32c427b5720dc5703df6b89f1126fa7f62ebd964",
        "nftIds": [
          "aa4a880e053644fee1475616a874e6689c2dfdbca0fb0a3db5a3f091c6e07d80"
        ],
        "startAmount": "100000000000",
        "expiration": {
          "blockHeight": 20000
        }
      },
      "bid": {
        "id": "ce81232de97526c7be16dc66f7efba4f8f92a686e8b8d1250f48a87dacd45945",
        "auctionId": "91221ffc0838fde5983e5ffe32c427b5720dc5703df6b89f1126fa7f62ebd964",
        "bidAmount": "150000000000"
      }
    },
    "timestamp": {
      "epoch": 143238352,
      "unix": 1633339552,
      "human": "2021-10-04T09:25:52.000Z"
    }
  }
}{
  "statusCode": 404,
  "error": "Not Found",
  "message": "Trade was not found!"
}{
  "statusCode": 422,
  "error": "Unprocessable Entity",
  "message": "\"id\" length must be 64 characters long"
}Examples
curl https://explorer.protokol.sh/api/nft/exchange/trade/1d1757bc7e598fd73f0ec670e1f2c517d7d9a2a94d447bd5daa0a9384ebd4e7econst response = connection.NFTExchangeApi("trades").get("VALID_ID");
>>> Promise<ApiResponse<TradeById>>Search Trades
/auctions/search
POST https://explorer.protokol.sh/api/nft/exchange/trades/search 
Search trades
Query Parameters
page
integer
The number of the page that will be returned
limit
integer
The number of resources per page
orderBy
string
Order by specific parameter (asc or desc) Example: orderBy=id:asc
transform
boolean
Returns modified or raw data
Request Body
senderPublicKey
string
Public key of a sender
auctionId
string
Id of an auction
startAmount
string
Start amount of auctions
expiration: { blockHeight}
object
Block height expiration
{
  "meta": {
    "totalCountIsEstimate": false,
    "count": 3,
    "pageCount": 1,
    "totalCount": 3,
    "next": null,
    "previous": null,
    "self": "/nft/exchange/auctions/search?transform=true&onlyActive=false&expired=false&includeBids=false&canceledBids=false&page=1&limit=100",
    "first": "/nft/exchange/auctions/search?transform=true&onlyActive=false&expired=false&includeBids=false&canceledBids=false&page=1&limit=100",
    "last": "/nft/exchange/auctions/search?transform=true&onlyActive=false&expired=false&includeBids=false&canceledBids=false&page=1&limit=100"
  },
  "data": [
    {
      "id": "877db0e352e38c27aede0b999f11afb0185fa41ffc2d1058ec288bc374d943a0",
      "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37",
      "nftAuction": {
        "nftIds": [
          "4f1f337873d530838dba06c9ec256cfd8a2acf7a94e87fbb0cb4c7304d3e6788"
        ],
        "startAmount": "10000000000",
        "expiration": {
          "blockHeight": 20000
        },
        "status": "CANCELED"
      },
      "timestamp": {
        "epoch": 143237784,
        "unix": 1633338984,
        "human": "2021-10-04T09:16:24.000Z"
      }
    },
     ...
  ]
}Examples
curl --request POST \
  --url https://explorer.protokol.sh/api/nft/exchange/trades/search \
  --header 'content-type: application/json' \
  --data '{
          "senderPublicKey": "03287bfebba4c7881a0509717e71b34b63f31e40021c321f89ae04f84be6d6ac37"
}'const response = connection.NFTExchangeApi("trades").search({
        auctionId: "VALID_AUCTION_ID",
        bidId: "VALID_BID_ID",
        senderPublicKey: "VALID_SENDER_PUBLIC_KEY",
});
>>> Promise<ApiResponseWithPagination<TradesResource[]>>Last updated
Was this helpful?