Gateway: GetTransferStatus
Get transfer status from cBridge gateway
REST API
POST
https://cbridge-prod2.celer.app/v2/getTransferStatus
Here is a curl example.
curl -d '{"transfer_id":"77D7E231B08120217969DED3FF1ED2B40C0028CA1E239B225F535C57808A23F6"}' -H "Content-Type: application/json" -X POST https://cbridge-prod2.celer.app/v2/getTransferStatus
When you get the response, you can get TransferHistoryStatus and XferStatus according to below mapping.
For example, if the "status" is 6 and the "refund_reason" is 4, we know this tx needs to be refunded for user since slippage is too low to finish the cBridge transfer flow.
Headers
Content-Type*
String
use application/json
Request Body
transfer_id*
String
GRPC-Web API
Request Parameter
transfer_id
String
Response Parameters
status
transfer status
wd_onchain
String
Serialized on-chain withdraw request(only for refund)
sorted_sigs
Array<String>
Celer SGN validators' sign for wd_onchain (only for refund)
signers
Array<String>
Celer SGN validators which has signed for wd_onchain (only for refund)
powers
Array<String>
Powers for each signed validators (only for refund)
refund_reason
Used when status is TRANSFER_TO_BE_REFUNDED
block_delay
Number
Waiting block for this transfer on src chain
src_block_tx_link
String
source chain transaction link
dst_block_tx_link
String
destination chain transaction link
TransferHistoryStatus
TRANSFER_UNKNOWN
Placeholder status
0
TRANSFER_SUBMITTING
cBridge gateway monitoring on-chain transaction
1
TRANSFER_FAILED
transfer failed, no need to refund
2
TRANSFER_WAITING_FOR_SGN_CONFIRMATION
cBridge gateway waiting for Celer SGN confirmation
3
TRANSFER_WAITING_FOR_FUND_RELEASE
waiting for user's fund release on destination chain
4
TRANSFER_COMPLETED
Transfer completed
5
TRANSFER_TO_BE_REFUNDED
Transfer failed, should trigger refund flow, whether it is Pool-Based or Mint/Burn refund​
6
TRANSFER_REQUESTING_REFUND
cBridge gateway is preparing information for user's transfer refund
7
TRANSFER_REFUND_TO_BE_CONFIRMED
The user should submit on-chain refund transaction based on information provided by this api
8
TRANSFER_CONFIRMING_YOUR_REFUND
cBridge monitoring transfer refund status on source chain
9
TRANSFER_REFUNDED
Transfer refund completed
10
TRANSFER_DELAYED
Transfer is put into a delayed execution queue
11
XferStatus
UNKNOWN
Placeholder
0
OK_TO_RELAY ​ ​ ​ ​ ​ ​ ​ ​
TRANSFER_WAITING_FOR_SGN_CONFIRMATION
1
SUCCESS
Transfer success
2
BAD_LIQUIDITY
Not enough liquidity
3
BAD_SLIPPAGE
Slippage is too low
4
BAD_TOKEN
not supported token or token amount not available
5
REFUND_REQUESTED
refund started
6
REFUND_DONE
refund finished
7
BAD_XFER_DISABLED
transfer for this token is disabled
8
BAD_DEST_CHAIN
not supported destination chain
9
We should focus on status types with BAD prefix, it shows the error reason for failed transfer transaction. Other status indicates normal transaction flow.
Last updated