Skip to content

Get Smart Contract Transaction History

Endpoint

GET https://api.mycactus.dev/custody/v1/api/projects/{b_id}/wallets/{wallet_code}/contract/orders
GET https://api.mycactus.com/custody/v1/api/projects/{b_id}/wallets/{wallet_code}/contract/orders

Parameters

Path Parameters

FieldTypeDescription
b_id
Required
StringBusiness line ID
wallet_code
Required
StringWallet ID

Query Parameters

FieldTypeDescription
chain
Required
StringCactus chain name
Allowed Value: Refer to Network Symbol column in Supported Token
keyword
Optional
StringKeyword (can refer to order ID, withdrawal order maker/applicant, contract address)
sort_by_time
Optional
StringSort by time (DESC, ASC)
Default value : DESC - Sort by descending creation time
status
Optional
StringOrder Status
start_time
Optional
IntegerFilter order start timestamp
end_time
Optional
IntegerFilter order end timestamp
limit
Optional
IntegerLimit default as 10
offset
Optional
IntegerOffset default as 0

Response

Response Body

Field Type Description
code Integer Response code (0 = success)
message String Response message
successful Boolean Whether the request was successful
data Object Response data (see data object details below)

data (object)

Field Type Description
offset Integer Offset
limit Integer Limit
total Integer Total number of records
list Object[] List of historical smart contract transactions (see list object details below)

list (object)

Field Type Description
time_stamp Long Order creation time stamp
order_no String Order number
chain String Chain name
chain_id String Chain ID
status String

Order status
Allowed values: FINISHED, FAILED, PROCESSING, ORDER_SEND_OUT, COMPLETED_FAILED, CANCELED

applicant String Order maker / applicant
amount Decimal Withdrawal amount
miner_fee Decimal Miner fee for execute the contract
tx_id String Transaction hash
contract_address String Contract address
contract_data String Contract data
gas_price Decimal Gas price
gas_limit Decimal Gas limit
max_fee_per_gas Decimal Max fee
max_priority_fee_per_gas Decimal Priority fee
description String Order description
deposit_trans Object[] Deposit transaction (see deposit_trans object details below)
withdraw_trans Object[] Withdraw transaction (see withdraw_trans object details below)

deposit_trans / withdraw_trans (object)

Field Type Description
amount Decimal Amount
coin_name String Coin/ token type

Response Example

{
    "code": 0,
    "message": "",
    "data": {
        "offset": 0,
        "limit": 10,
        "list": [
            {
                "time_stamp": 1607940309000,
                "miner_fee": 4489280000000000,
                "order_no": "D666666000001",
                "contract_address": "0xf8ac10e65f2073460aad5f28e1eabe807dc287cf",
                "gas_price": 20000000000,
                "gas_limit": 274556,
                "contract_data": "0x58c22be7000000000000000000000000018050e30e4bf1cf79bb8b8c2297aa750da045440000000000000000000000000000000000000000000000000000000000000000",
                "applicant": "XXXXX@xyz.com",
                "status": "FINISHED",
                "amount": 10000000000000000,
                "description": null,
                "tx_id": "0x2c9b57d499dfcbe7a1bac2461d39471b2d6da46b9b81620b93b4e5e8b9e41fb6",
                "deposit_trans": [
                    {
                        "amount": 10000000000000000,
                        "coin_name": "AWETH"
                    }
                ],
                "withdraw_trans": [
                    {
                        "amount": 10000000000000000,
                        "coin_name": "ETH"
                    }
                ]
            }
        ],