Individual trade info

Documentation for the /history/tx endpoint used to fetch trade information for a given transaction hash.

GET /history/v2/tx/{tx_hash} endpoint will return trade information for a specific transaction hash, for trades that occurred on Bebop.

This endpoint will search all Bebop transactions across all available chains (Ethereum, Polygon, Arbitrum).

Returns

Field
Description

chain_id

Chain ID where the trade occurred

txHash

Transaction hash of the trade

status

Status of the trade (CONFIRMED, FAILED)

type

Trade type (121, 12M, M21, 12MPercentages, M21Percentages)

taker

Wallet address of the sender of the transaction (address that sends the sellTokens)

receiver

Wallet address of the receiver of the transaction (address that receives the buyTokens)

sellTokens

Sell tokens mapping of the token ticker to token info (amount, amountUsd, contractAddress)

buyTokens

Buy tokens mapping of the token ticker to token info (amount, amountUsd, contractAddress)

volumeUsd

Volume of the trade in USD (excluding gas fees)

gasFeeUsd

Gas fee amount in USD

timestamp

Time and date when the trade occurred

Errors

Code
Detail
Reason

400

Invalid tx hash: {tx_hash}.

Invalid transaction hash format (not a 66 character hex string).

404

Tx hash not found: {tx_hash}.

Transaction hash not found. Make sure the transaction hash corresponds to a transaction executed on Bebop.

500

Something went wrong, try again later.

Uncaught error (server side).

Example

Request https://api.bebop.xyz/history/v2/tx/0x8f4adfc8aa60711c464194a2d297f823e7f54fadc3995ea1844d6731fdaf38ee

Response

```json
{
    "chain_id": 137,
    "txHash": "0x8f4adfc8aa60711c464194a2d297f823e7f54fadc3995ea1844d6731fdaf38ee",
    "status": "CONFIRMED",
    "type": "121",
    "taker": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
    "receiver": "0x5Bad996643a924De21b6b2875c85C33F3c5bBcB6",
    "sellTokens": {
        "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270": {
            "amount": "5000000000000000000",
            "amountUsd": 3.1801205247873106,
            "symbol": "WMATIC"
        }
    },
    "buyTokens": {
        "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063": {
            "amount": "3160088590795045782",
            "amountUsd": 3.160088590795046,
            "symbol": "DAI"
        }
    },
    "volumeUsd": 3.160088590795046,
    "gasFeeUsd": 0.019895358516676665,
    "timestamp": "2023-06-29 13:10:24Z"
}
```

Last updated