ChainHop
Search…
SwapHistory
Get list of user's swap history
get
https://api-prod.chainhop.net
/chainhop/getHistory
Get the user's swap history

Request Parameters

Name
Type
Description
addr
String
User's wallet address
page_size
Number
The size of history items
next_page_token
String
Next page token

Response Parameters

Name
Type
Description
history
history list
next_page_token
String
Next page token for another request
current_size
String
Current history list size
total_size
String
Total size of history items for this user

SwapHistory

Name
Type
Description
swap_id
String
Unique key for swap
amount_in
Sending assets before swap
amount_out
Receiving assets after swap
src_block_tx_link
String
Source chain transaction link
dst_block_tx_link
String
Destination chain transaction link
swap_status
SwapStatus
Swap status
create_ts
String
Timestamp for swap creation
cbr_transfer_id
String
cBridge transfer id if cBridge is involved
bridge_type
String
bridge type
update_ts
String
Timestamp for latest swap update

TokenAmount

Name
Type
Description
token
Token
Token info
amount
String
Amount with token decimals

SwapType

Value
Description
ST_UNKNOWN
Placeholder
ST_CROSS_CHAIN
Destination chain swap after bridging
ST_DIRECT
Same Chain Token Swap
ST_CROSS_CHAIN_TO_USR
No destination chain swap after bridging
Copy link
On this page
get
Get the user's swap history
Request Parameters
Response Parameters
SwapHistory
TokenAmount
SwapType