Skip to main content

Get transactions

You can get multiple transactions or a specific transaction using the Phosphor API.

Get multiple transactions

Issue a GET request to the transactions endpoint to get all transactions for the organization.

GET https://admin-api.phosphor.xyz/v1/transactions

This is a paginated endpoint that returns results up to a certain limit.

  • Specify a cursor from the previous response return the next batch of results from the offset.
  • Specify an order_by that equals created_at to order results by corresponding timestamps.
  • Specify an order_direction of ASC or DESC to sort results in ascending or descending order.
  • You can specify additional query parameters to further filter the results, including network_ids, tx_types, states, or signers.
GET https://admin-api.phosphor.xyz/v1/transactions?limit=1&tx_types=ADMIN_MINT
Example response
{
"cursor": "c3RfOGM4ZTRmNzYtNWM2ZC00Yzg4LTg2NjQtZjgwYzhjODc4YTFl",
"has_more": false,
"results": [
{
"created_at": "2022-11-29T12:28:32.609557+00:00",
"data": {
"item_id": "4b4cfe51-d821-4048-bd4e-f913f121ae32",
"quantity": 1500,
"to_address": "0x8051f937A90F9750bB2929a665c9bbe33c831137"
},
"failure_count": 0,
"id": "8c8e4f76-5c6d-4c88-8664-f80c8c878a1e",
"network_id": 59140,
"nonce": 17,
"on_chain_status": "SUCCESS",
"signer": "0x8051f937A90F9750bB2929a665c9bbe33c831137",
"state": "COMPLETED",
"tx_hash": "0x1c4cd8c13a5a7a9eb0dc8752fb3337c885f8f2a78f3bb392a8a3e72ba18aacf4",
"tx_type": "ADMIN_MINT"
}
],
"total_results": 1
}
  • cursor indicates an offset from which the next batch of results begins.
  • has_more returns true if there are more results than already displayed.
  • results returns an array of transactions from the search.
  • total_results returns the total number of results from the response.

Get a specific transaction by ID

Issue a GET request to the transactions endpoint with a transaction_id to get a specific transaction.

GET https://admin-api.phosphor.xyz/v1/transactions/{transaction_id}
Example response
{
"created_at": "2022-11-29T12:28:32.609557+00:00",
"data": {
"item_id": "4b4cfe51-d821-4048-bd4e-f913f121ae32",
"quantity": 1500,
"to_address": "0x8051f937A90F9750bB2929a665c9bbe33c831137"
},
"failure_count": 0,
"id": "8c8e4f76-5c6d-4c88-8664-f80c8c878a1e",
"network_id": 59140,
"nonce": 17,
"on_chain_status": "SUCCESS",
"signer": "0x8051f937A90F9750bB2929a665c9bbe33c831137",
"state": "COMPLETED",
"tx_hash": "0x1c4cd8c13a5a7a9eb0dc8752fb3337c885f8f2a78f3bb392a8a3e72ba18aacf4",
"tx_type": "ADMIN_MINT"
}