History & Status
Use the history endpoint for account-level reconciliation and the status endpoints to locate a transfer by its external or ValueChain identifier.
Deposit and withdrawal history
GET /user/{userAddress}/deposit-withdrawals
curl "https://mainnet-gw.sodex.dev/api/v1/user/0x1111111111111111111111111111111111111111/deposit-withdrawals?side=withdraw&pending=true&limit=10" \
-H "Accept: application/json"Query parameters
start
int32
No
Pagination offset. Minimum 0.
startTime
int64
No
Start-time filter. Minimum 0.
endTime
int64
No
End-time filter. Minimum 0.
limit
int32
No
Page size from 1 to 10; default 10.
side
string
No
deposit or withdraw.
token
string
No
Token identifier or address.
pending
boolean
No
Select pending or non-pending records.
chain
string
No
External chain identifier.
coinSymbol
string
No
Coin symbol.
data.records contains the current page and data.total contains the total number of matches. A record includes account, amount, coin, chain, decimals, sender, receiver, status, timestamps, token, and current transaction hash. It can also include originTxHash, withdrawFee, withdrawId, failCode, and failReason.
Transfer status endpoints
These APIs return external deposit or withdrawal records that match a transfer identifier.
Deposit status
Return deposit records for an external-chain transaction hash.
Request
Query Parameters
chain
string
true
External chain identifier.
txHash
string
true
External-chain deposit transaction hash.
Request Example
Additional Information:
The same deposit transaction hash may match multiple records with different
nvalues.If
chaindoes not match the record, the API returns an empty result instead of an error.
Withdrawal status
Return withdrawal records by withdrawal ID or by the ValueChain transaction hash of the withdrawal request.
Request
Query Parameters
chain
string
true
External chain identifier.
withdrawId
string
false
Withdrawal request identifier. Required when txHash is omitted.
txHash
string
false
ValueChain transaction hash of the withdrawal request. Required when withdrawId is omitted.
Request Examples
Query by withdrawal ID:
Query by the ValueChain withdrawal-request transaction hash:
Additional Information:
At least one of
withdrawIdandtxHashis required.Prefer
withdrawId. When both parameters are provided,withdrawIdtakes precedence andtxHashis ignored.withdrawIdis forwarded unchanged. Clients must not assume that it is always numeric.The
txHashfallback accepts only the ValueChain transaction hash of the withdrawal request. It cannot query by the final external-chain withdrawal transaction hash.If
chaindoes not match the record, the API returns an empty result instead of an error.
Response
Both APIs use the same response schema.
code
int32
true
Response status code. 0 means success.
data
DepositWithdrawalHistory
true
Matching deposit or withdrawal records.
timestamp
uint64
true
Response timestamp in milliseconds.
DepositWithdrawalHistory
records
DepositWithdrawalRecord[]
true
Matching deposit or withdrawal records.
total
int32
true
Total number of matching records.
DepositWithdrawalRecord
account
string
true
Sodex user account address.
amount
string
true
Transfer amount.
chain
string
true
External chain identifier.
coin
string
true
Coin symbol.
decimals
uint8
true
Coin decimals.
failCode
string
true
Failure code. Empty when no failure occurred.
failReason
string
true
Failure reason. Empty when no failure occurred.
n
string
true
Mirror record sequence or cursor value.
receiver
string
true
Receiving address.
reportAmount
string
true
Amount reported by the external transfer system.
sender
string
true
Sending address.
status
string
true
Current transfer status.
statusTime
int64
true
Time when the status was last updated.
stmp
int64
true
Record timestamp.
token
string
true
Token identifier or contract address.
txHash
string
true
Current transaction hash.
originTxHash
string
false
Original transaction hash. Omitted when unavailable.
type
string
true
Record type.
withdrawFee
string
false
Withdrawal fee. Omitted when not applicable.
withdrawId
uint64
false
Withdrawal identifier. Omitted when unavailable.
Response Example
Empty Response Example
No matching record is a successful response:
Last updated