A transaction records one movement of funds in your account: a deposit, a withdrawal, a transfer, a swap, a payment. Its type says which, and decides which detail object comes with it:
type | Detail object |
|---|---|
CRYPTO_DEPOSIT | cryptoDeposit |
CRYPTO_WITHDRAW | cryptoWithdraw |
FIAT_DEPOSIT | fiatDeposit |
FIAT_WITHDRAW | fiatWithdraw |
TRANSFER | transfer |
TRADE | trade |
PAYMENT | payment |
CREDIT | credit |
Only the matching detail object is present; the others are left out of the response rather than set to null.
Deposits, transfers, swaps and payments are recorded once they’re complete, so they appear with status SUCCEED and never change after that. Withdrawals start as PENDING and turn SUCCEED under the same id.
One movement of funds in your account, with the detail object for its type.
idintegerRequiredTransaction ID. Unique across all types.
supportCodestringRequiredCode to quote to support, such as SW-K7NP2QR-MXVT.
timestampintegerRequiredWhen SwapWallet recorded the transaction, in Unix milliseconds. For a crypto deposit, the time it was credited, not its block time.
typeenumRequiredWhat kind of transaction this is. Decides which detail object is present.
Possible values
CRYPTO_DEPOSITCrypto received from a blockchain address. Details in cryptoDeposit.CRYPTO_WITHDRAWCrypto sent to a blockchain address. Details in cryptoWithdraw.FIAT_DEPOSITToman deposited. Details in fiatDeposit.FIAT_WITHDRAWToman withdrawn to a bank account. Details in fiatWithdraw.TRANSFERA transfer between SwapWallet users, in either direction. Details in transfer.TRADEA swap. Details in trade.PAYMENTAn invoice paid from your balance, such as a Telegram purchase. Details in payment.CREDITCredit added or taken back by SwapWallet. Details in credit.APPLICATION_SETTLEMENTIncome from your payment gateway settled to your wallet. Details in applicationSettlement.REQUEST_INVOICEA payment request between users, paid or received. Details in requestInvoice. Filter it with PAYMENT or APPLICATION_SETTLEMENT.INTERNAL_MOVE_BALANCEA move between your main balance and a Box. Details in boxMove.P2P_PURCHASEA peer-to-peer purchase. Details in p2pPurchase.statusenumRequiredDeposits, transfers, trades, payments and credits are recorded only once complete, so they are always SUCCEED. Only withdrawals start as PENDING.
Possible values
SUCCEEDComplete.PENDINGA crypto withdrawal not yet confirmed on the network, or a Toman withdrawal not yet taken by the bank in full.networkenumRequiredThe network the transaction ran on. INTERNAL for anything that stays inside SwapWallet.
Possible values
INTERNALInside SwapWallet, with no blockchain involved.TRONETHEREUMBSCBNB Smart Chain.TONPOLYGONARBITRUMAVALANCHEOPTIMISMSOLANAFANTOMSUIDOGEBTCADAXRPNEARexchangeFeeMoneyRequiredFee SwapWallet charged: the withdrawal fee for a crypto withdrawal, the sum of the transfer fees for a Toman withdrawal. Always 0 for a trade, whose fee is in its rate, and for deposits and transfers.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
transferobjectPresent only when type is TRANSFER.
amountMoneyRequiredAmount transferred. Transfers between SwapWallet users have no fee.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredValue in US dollars (USD) at the time of the transaction.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
userCurrencyValueMoneyRequiredThe same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
fromUserobjectRequiredThe sender.
idintegerRequiredSwapWallet user ID.
isYoubooleanRequiredWhether this user is you, the owner of the API key.
namestringRequiredThe name you saved for this contact, or the user's display name.
profileUrlstringnullableProfile picture URL. null when the user has none.
toUserobjectRequiredThe recipient. The transfer is incoming when toUser.isYou is true.
idintegerRequiredSwapWallet user ID.
isYoubooleanRequiredWhether this user is you, the owner of the API key.
namestringRequiredThe name you saved for this contact, or the user's display name.
profileUrlstringnullableProfile picture URL. null when the user has none.
tradeobjectPresent only when type is TRADE.
marketstringRequiredThe market, as BASE/QUOTE, for example TON/USDT.
sideenumRequiredDirection, seen from the market’s base token.
Possible values
BUYYou received the base token.SELLYou gave the base token.typeenumRequiredHow the trade was made.
Possible values
OTCA swap, from the app or this API.BOXA trade inside one of your Boxes.TOKEN_REPLACEMENTA token SwapWallet replaced for you, for example after a token migration.MANUAL_OTCA sale settled outside the platform and recorded by SwapWallet.sourceAmountMoneyRequiredAmount you gave.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
sourceValueMoneyRequiredsourceAmount in US dollars.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
sourceUserCurrencyValueMoneyRequiredsourceAmount in your display currency, at the current rate.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
destinationAmountMoneyRequiredAmount you received.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
destinationValueMoneyRequireddestinationAmount in US dollars.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
destinationUserCurrencyValueMoneyRequireddestinationAmount in your display currency, at the current rate.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
marketRatedecimal stringRequiredPrice of the base token in the quote token that this trade got, fee included.
cryptoDepositobjectPresent only when type is CRYPTO_DEPOSIT.
amountMoneyRequiredAmount credited to your balance.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredValue in US dollars (USD) at the time of the transaction.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
userCurrencyValueMoneyRequiredThe same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
contractenumThe token standard on the network. Left out for a network's own coin, such as TRX on Tron.
Possible values
TRC20Tron token.ERC20Ethereum, Arbitrum or Polygon token.BEP20BNB Smart Chain token.JETTONTON token.SPLSolana token.sourceAddressstringRequiredThe address the funds came from.
destinationAddressstringRequiredYour SwapWallet deposit address that received them.
hashstringRequiredTransaction hash on the network.
memostringMemo or tag of the deposit. Left out when there is none.
blockScanUrlstringRequiredLink to the transaction on a block explorer.
cryptoWithdrawobjectPresent only when type is CRYPTO_WITHDRAW.
amountMoneyRequiredAmount sent to the destination address.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredValue in US dollars (USD) at the time of the transaction.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
userCurrencyValueMoneyRequiredThe same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
contractenumThe token standard on the network. Left out for a network's own coin, such as TRX on Tron.
Possible values
TRC20Tron token.ERC20Ethereum, Arbitrum or Polygon token.BEP20BNB Smart Chain token.JETTONTON token.SPLSolana token.sourceAddressstringSwapWallet’s sending address. Left out until the withdrawal is sent.
destinationAddressstringRequiredThe address you withdrew to.
hashstringTransaction hash on the network. Left out until the withdrawal is sent.
memostringThe memo sent with the withdrawal. Left out when there is none.
blockScanUrlstringLink to the transaction on a block explorer. Left out until the withdrawal is sent.
workflowarray of objectsRequiredThe withdrawal’s progress, one entry per step, always in this order.
stepenumRequiredThe step.
Possible values
TRANSACTION_CREATEDThe request was recorded and the amount taken from your balance.ACCEPTED_BY_ADMINApproved for sending, automatically or after a review.PUBLISHED_TO_NETWORKSent to the network; hash is now set.CONFIRMED_BY_NETWORKConfirmed on the network. The transaction’s status turns SUCCEED.donebooleanRequiredWhether the step is complete.
dateISO 8601 timestampnullableWhen the step completed. null until then.
fiatDepositobjectPresent only when type is FIAT_DEPOSIT.
amountMoneyRequiredAmount credited, in IRT.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredValue in US dollars (USD) at the time of the transaction.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
userCurrencyValueMoneyRequiredThe same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
methodenumRequiredHow the Toman arrived.
Possible values
IR_GATEWAYCard payment through a bank gateway.CASH_IN_CODEBank transfer with your deposit ID.A2AAccount-to-account transfer within one bank.ACHPAYA transfer.RTGSSATNA transfer.DIRECT_DEBITDirect debit from your bank account.BANK_TRANSFERA bank transfer matched to your account.ADMINRecorded by SwapWallet support.invoiceobjectGateway payment details. Present when method is IR_GATEWAY.
cashInCodeobjectDeposit-ID transfer details. Present when method is CASH_IN_CODE.
directDepositobjectDirect debit details. Present when method is DIRECT_DEBIT.
bankTransferobjectMatched bank transfer details. Present when method is BANK_TRANSFER.
fiatWithdrawobjectPresent only when type is FIAT_WITHDRAW.
amountMoneyRequiredTotal amount sent to the bank account, in IRT, across all transfers.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredValue in US dollars (USD) at the time of the transaction.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
userCurrencyValueMoneyRequiredThe same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
ibanstringRequiredDestination IBAN (Sheba).
bankstringRequiredBank of the IBAN, such as SAMAN or MELLAT.
holderNamestringRequiredAccount holder’s name.
predictedDoneTimeISO 8601 timestampWhen the bank is expected to settle it. Left out when there is no estimate still ahead.
publicReceiptUrlstringLink to the bank receipt. Present only for a single-transfer withdrawal that the bank has taken.
trackingCodestringBank tracking code. Present only for a single-transfer withdrawal that the bank has taken.
trackingCodeMethodenumWhich kind of code trackingCode is.
Possible values
A2AAccount-to-account; the code is a tracking number (شماره پیگیری).ACHPAYA; the code is a reference code (کد رهگیری).RTGSSATNA; the code is a reference code (کد رهگیری).transfersarray of objectsRequiredThe bank transfers the withdrawal is paid in. A large withdrawal is split into several, sent one after another.
idintegerRequiredID of this transfer.
amountMoneyRequiredAmount of this transfer.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
feeMoneyRequiredWithdrawal fee for this transfer.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
statusenumRequiredWhether the bank has taken this transfer.
Possible values
PENDINGNot yet sent to or taken by the bank.SUCCEEDThe bank has taken it.methodenumHow it’s paid. Left out until it’s sent.
Possible values
A2AAccount-to-account; the code is a tracking number (شماره پیگیری).ACHPAYA; the code is a reference code (کد رهگیری).RTGSSATNA; the code is a reference code (کد رهگیری).predictedDoneTimeISO 8601 timestampExpected settlement time, when there is one still ahead.
publicReceiptUrlstringLink to the bank receipt, once there is one.
trackingCodestringBank tracking code, once there is one.
trackingCodeMethodenumWhich kind of code trackingCode is.
Possible values
A2AAccount-to-account; the code is a tracking number (شماره پیگیری).ACHPAYA; the code is a reference code (کد رهگیری).RTGSSATNA; the code is a reference code (کد رهگیری).paymentobjectPresent only when type is PAYMENT.
invoiceobjectRequiredThe invoice this transaction paid.
idintegerRequiredInvoice ID. Pass it to Pay an invoice.
supportCodestringRequiredCode to quote to support.
statusenumRequiredWhere the invoice stands.
Possible values
PENDINGWaiting for payment.PAIDPaid.DELIVEREDPaid and the product delivered.EXPIREDNot paid before expiredAt.CANCELEDCanceled.titlestringRequiredMachine-readable product title, such as TELEGRAM_STARS, TELEGRAM_PREMIUM or TELEGRAM_ADS.
readableTitlestringnullableProduct title in your account’s language.
typeenumRequiredWhat the invoice is for.
Possible values
JETTONTelegram Premium or Stars from the shop.TELEGRAM_ADSA Telegram Ads top-up.SHOP_ORDERAn order from the SwapWallet shop.GIFT_CARDA gift card.EXTERNAL_APPLICATIONA payment to a merchant’s payment gateway.GIVEAWAYA giveaway.AD_CHEQUEAn ad cheque.AD_CHEQUE_TOP_UPAn ad cheque top-up.HONGBAO_PACKETA red-envelope (hongbao) packet.EXTRA_USER_WALLETAn extra wallet for your account.AI_CREDITAI credit.amountMoneyRequiredAmount to pay, fee included.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredamount in Toman (IRT).
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
allowedPaymentTokensarray of stringsRequiredTokens the invoice accepts in the app.
allowedLockedFundsbooleanRequiredWhether the invoice may be paid with crypto still held by the 72-hour rule (see Crypto withdrawals).
feeMoneyRequiredFee included in amount.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
createdAtISO 8601 timestampRequiredWhen the invoice was created.
expiredAtISO 8601 timestampnullablePayment deadline.
paidWithMoneynullableWhat it was paid with. null until paid.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
paidAtISO 8601 timestampnullableWhen it was paid. null until then.
originalAmountMoneynullableAmount before a discount code. null without one.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
discountAmountMoneynullableDiscount applied. null without one.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
discountCodestringnullableDiscount code applied. null without one.
amountMoneyRequiredAmount paid.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredValue in US dollars (USD) at the time of the transaction.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
userCurrencyValueMoneyRequiredThe same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
creditobjectPresent only when type is CREDIT.
typeenumRequiredWhy the credit was added or taken back.
Possible values
REFERRAL_REWARDReferral reward.CASHBACKCashback.GIFT_CARDA redeemed gift card.SHOP_ORDER_REFUNDRefund of a shop order.JETTON_REFUNDRefund of a Telegram Premium or Stars purchase.WITHDRAW_RETURNA withdrawal that came back.TRANSACTIONS_CORRECTIONCorrection by SwapWallet.EXPIRED_GIFTAn unused campaign gift taken back (negative amount).LOANA loan.GIVEAWAYGiveaway prize.AD_CHEQUE_ACTIVATIONAD_CHEQUE_REFERRALDOGS_TASKDOGS_TASK_REFERRALDOGS_REFERRALMOONCampaign reward.ISWAPCampaign reward.ISWAP_REFERRALCampaign reward.GOOGLE_27_BIRTHCampaign reward.CAKE_PRIZECampaign reward.WORLDCUP_PRIZECampaign reward.amountMoneyRequiredAmount credited.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
valueMoneyRequiredValue in US dollars (USD) at the time of the transaction.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
userCurrencyValueMoneyRequiredThe same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
applicationSettlementobjectSettlement of your payment gateway. Present only when type is APPLICATION_SETTLEMENT.
requestInvoiceobjectThe payment request and who paid whom. Present only when type is REQUEST_INVOICE.
boxMoveobjectPresent only when type is INTERNAL_MOVE_BALANCE.
directionenumRequiredWhich way the funds moved.
Possible values
TO_BOXFrom your main balance into the Box.TO_MAINFrom the Box back to your main balance.amountMoneyRequiredAmount moved.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
userCurrencyValueMoneyRequiredThe same value in your account's display currency, usually IRT. It's converted at the current rate each time you read it, so it moves with the market.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
boxobjectThe Box this transaction belongs to, such as a trade made inside a Box. Left out otherwise.
idintegerRequiredBox ID.
namestringRequiredBox name.
typeenumRequiredKind of Box.
Possible values
SIMPLEA single-asset Box.PIEA mix of several assets.operationIdintegernullableThe Box operation that made this transaction, if any.
p2pPurchaseobjectPresent only when type is P2P_PURCHASE.
balanceChangesarray of objectsHow this transaction moved your balance, one entry per token. Only Retrieve a transaction returns it; lists leave it out.
tokenstringRequiredToken symbol.
amountMoneyRequiredChange in your total balance; negative when it went down.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
beforeMoneyRequiredTotal balance before, on-hold amounts included.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
afterMoneyRequiredTotal balance after, on-hold amounts included.
numberdecimal stringRequiredThe amount as a decimal string. Trailing zeros are dropped, so 0.5, not 0.50.
unitstringRequiredThe token symbol, such as USDT, TON or BTC. IRT is the Toman; USD marks a value in US dollars.
{
"id": 3051210,
"supportCode": "SW-K7NP2QR-MXVT",
"timestamp": 1795164000000,
"type": "CRYPTO_DEPOSIT",
"status": "SUCCEED",
"network": "TRON",
"exchangeFee": {
"number": "0",
"unit": "USDT"
},
"cryptoDeposit": {
"amount": {
"number": "50",
"unit": "USDT"
},
"value": {
"number": "50",
"unit": "USD"
},
"userCurrencyValue": {
"number": "13620000",
"unit": "IRT"
},
"contract": "TRC20",
"sourceAddress": "TQ9yLxm1yC6uX3YgYvG6S4w7HxQvQ1pNnA",
"destinationAddress": "TJ4qN2b8pW3mXvKc7RtYf5HsLd9eUa1oZG",
"hash": "8ce3e71ef8635d2bf27913bb680d7f88ad0238ea42c779c4b30f4e587d07da8e",
"blockScanUrl": "https://tronscan.org/#/transaction/8ce3e71ef8635d2bf27913bb680d7f88ad0238ea42c779c4b30f4e587d07da8e"
}
}/v2/transactionReturns your transactions, newest first, filtered by any combination of the parameters below. Array parameters repeat the key: types=CRYPTO_DEPOSIT&types=TRANSFER.
The list is paged with an ID cursor:
id as beforeId.sortDir=ASC and pass the last item’s id as afterId.result.hasNext is true when more transactions match beyond this page, in the order you asked for.
Detecting deposits. To see every incoming deposit without touching a blockchain, call this endpoint once a minute with types=CRYPTO_DEPOSIT&types=TRANSFER and the tokens you care about, and remember the IDs you’ve already handled. CRYPTO_DEPOSIT is a deposit from a blockchain address; TRANSFER is a transfer from another SwapWallet user, and it’s incoming when transfer.toUser.isYou is true (outgoing transfers match the same filter). With limit=20 a single call per minute is usually enough.
IDs are assigned when a transaction is created, not when it’s saved, so a transaction can appear with a lower id than one you’ve already seen. When polling, don’t rely on afterId alone: re-read a window that overlaps your last call and skip the IDs you’ve already handled.
typesarray of enumsOnly these transaction types.
Possible values
CRYPTO_DEPOSITCrypto received from a blockchain address. Details in cryptoDeposit.CRYPTO_WITHDRAWCrypto sent to a blockchain address. Details in cryptoWithdraw.FIAT_DEPOSITToman deposited. Details in fiatDeposit.FIAT_WITHDRAWToman withdrawn to a bank account. Details in fiatWithdraw.TRANSFERA transfer between SwapWallet users, in either direction. Details in transfer.TRADEA swap. Details in trade.PAYMENTAn invoice paid from your balance, such as a Telegram purchase. Details in payment.CREDITCredit added or taken back by SwapWallet. Details in credit.APPLICATION_SETTLEMENTIncome from your payment gateway settled to your wallet. Details in applicationSettlement.INTERNAL_MOVE_BALANCEA move between your main balance and a Box. Details in boxMove.P2P_PURCHASEA peer-to-peer purchase. Details in p2pPurchase.tokensarray of stringsOnly transactions in these tokens. A trade matches if either side is one of them.
networksarray of enumsOnly transactions on these networks. INTERNAL covers transfers, trades and payments.
Possible values
INTERNALInside SwapWallet, with no blockchain involved.TRONETHEREUMBSCBNB Smart Chain.TONPOLYGONARBITRUMAVALANCHEOPTIMISMSOLANAFANTOMSUIDOGEBTCADAXRPNEARstartDateISO 8601 timestampOnly transactions recorded at or after this time, such as 2026-11-01T00:00:00Z.
endDateISO 8601 timestampOnly transactions recorded at or before this time.
querystringFree-text search. Matches a support code exactly, or part of a wallet address, or the hash of a crypto deposit, case-insensitively.
supportCodesarray of stringsOnly transactions with these support codes.
idsarray of integersOnly transactions with these IDs.
userIdintegerOnly transactions with this SwapWallet user, such as transfers to or from them.
usernamestringSame as userId, by SwapWallet username.
recipientsarray of integersSwapWallet user IDs. Narrows transfers to those with any of these users; other types aren’t affected, so combine it with types=TRANSFER.
boxesenumHow to treat transactions made inside a Box. Unset, they’re listed like any other. Once set, types filters only transactions outside Boxes.
Possible values
HIDELeave Box transactions out.ADDAdd Box transactions, whatever their type.ONLYReturn Box transactions only.boxIdsarray of integersWith boxes set to ADD or ONLY, only these Boxes.
afterIdintegerOnly transactions with an id greater than this. Use with sortDir=ASC to page forward.
beforeIdintegerOnly transactions with an id smaller than this. Use with the default order to page back.
sortByarray of enumsField to sort by. Each sortBy pairs with the sortDir at the same position; a value without a partner is ignored.
Possible values
idtimestampsupportCodetypenetworksortDirarray of enumsSort direction.
Possible values
DESCNewest first.ASCOldest first.limitintegerPage size. Defaults to 100 instead when beforeId is set.
Returns result.data, an array of Transaction objects, and result.hasNext.
VALIDATION_FAILEDlimit is outside 1 to 100.
INVALID_REQUEST_PARAMETERA parameter has a value outside its list, or a date isn’t ISO 8601.
INTERNAL_SERVER_ERRORsortBy has a value outside its list.
curl -G https://swapwallet.app/api/v2/transaction \
-H "Authorization: Bearer $SWAPWALLET_API_KEY" \
-d types=CRYPTO_DEPOSIT \
-d types=TRANSFER \
-d tokens=USDT \
-d tokens=TON \
-d tokens=TRX \
-d sortDir=DESC \
-d limit=20const response = await fetch('https://swapwallet.app/api/v2/transaction?types=CRYPTO_DEPOSIT&types=TRANSFER&tokens=USDT&tokens=TON&tokens=TRX&sortDir=DESC&limit=20', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SWAPWALLET_API_KEY}`,
},
});
const data = await response.json();
console.log(data.result);import os
import requests
response = requests.get(
"https://swapwallet.app/api/v2/transaction",
headers={"Authorization": f"Bearer {os.environ['SWAPWALLET_API_KEY']}"},
params={"types": ["CRYPTO_DEPOSIT", "TRANSFER"], "tokens": ["USDT", "TON", "TRX"], "sortDir": "DESC", "limit": "20"},
)
print(response.json()["result"])<?php
$ch = curl_init('https://swapwallet.app/api/v2/transaction?types=CRYPTO_DEPOSIT&types=TRANSFER&tokens=USDT&tokens=TON&tokens=TRX&sortDir=DESC&limit=20');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SWAPWALLET_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data['result']);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://swapwallet.app/api/v2/transaction?types=CRYPTO_DEPOSIT&types=TRANSFER&tokens=USDT&tokens=TON&tokens=TRX&sortDir=DESC&limit=20", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SWAPWALLET_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}{
"status": "OK",
"result": {
"hasNext": false,
"data": [
{
"id": 3051234,
"supportCode": "SW-M3NP8QR-TXVW",
"timestamp": 1795164100000,
"type": "TRANSFER",
"status": "SUCCEED",
"network": "INTERNAL",
"exchangeFee": {
"number": "0",
"unit": "TON"
},
"transfer": {
"amount": {
"number": "5",
"unit": "TON"
},
"value": {
"number": "4.9",
"unit": "USD"
},
"userCurrencyValue": {
"number": "1334760",
"unit": "IRT"
},
"fromUser": {
"id": 4821,
"isYou": false,
"name": "علی رضایی",
"profileUrl": null
},
"toUser": {
"id": 52310,
"isYou": true,
"name": "مریم کاظمی",
"profileUrl": "https://swapwallet.app/media/public/profile-picture/52310/4be1c0d2.png"
}
}
},
{
"id": 3051210,
"supportCode": "SW-K7NP2QR-MXVT",
"timestamp": 1795164000000,
"type": "CRYPTO_DEPOSIT",
"status": "SUCCEED",
"network": "TRON",
"exchangeFee": {
"number": "0",
"unit": "USDT"
},
"cryptoDeposit": {
"amount": {
"number": "50",
"unit": "USDT"
},
"value": {
"number": "50",
"unit": "USD"
},
"userCurrencyValue": {
"number": "13620000",
"unit": "IRT"
},
"contract": "TRC20",
"sourceAddress": "TQ9yLxm1yC6uX3YgYvG6S4w7HxQvQ1pNnA",
"destinationAddress": "TJ4qN2b8pW3mXvKc7RtYf5HsLd9eUa1oZG",
"hash": "8ce3e71ef8635d2bf27913bb680d7f88ad0238ea42c779c4b30f4e587d07da8e",
"blockScanUrl": "https://tronscan.org/#/transaction/8ce3e71ef8635d2bf27913bb680d7f88ad0238ea42c779c4b30f4e587d07da8e"
}
}
]
}
}/v1/transaction/{id}Returns one transaction by its ID. Unlike the list, the response includes balanceChanges: exactly how the transaction moved your balance of each token. Use it to follow a withdrawal until its status turns SUCCEED.
idintegerRequiredTransaction ID.
Returns a Transaction object in result, with balanceChanges.
TRANSACTION_NOT_FOUNDNo transaction of yours has this ID.
curl https://swapwallet.app/api/v1/transaction/3051210 \
-H "Authorization: Bearer $SWAPWALLET_API_KEY"const response = await fetch('https://swapwallet.app/api/v1/transaction/3051210', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SWAPWALLET_API_KEY}`,
},
});
const data = await response.json();
console.log(data.result);import os
import requests
response = requests.get(
"https://swapwallet.app/api/v1/transaction/3051210",
headers={"Authorization": f"Bearer {os.environ['SWAPWALLET_API_KEY']}"},
)
print(response.json()["result"])<?php
$ch = curl_init('https://swapwallet.app/api/v1/transaction/3051210');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SWAPWALLET_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);
print_r($data['result']);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://swapwallet.app/api/v1/transaction/3051210", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SWAPWALLET_API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
fmt.Println(string(data))
}{
"status": "OK",
"result": {
"id": 3051210,
"supportCode": "SW-K7NP2QR-MXVT",
"timestamp": 1795164000000,
"type": "CRYPTO_DEPOSIT",
"status": "SUCCEED",
"network": "TRON",
"exchangeFee": {
"number": "0",
"unit": "USDT"
},
"cryptoDeposit": {
"amount": {
"number": "50",
"unit": "USDT"
},
"value": {
"number": "50",
"unit": "USD"
},
"userCurrencyValue": {
"number": "13620000",
"unit": "IRT"
},
"contract": "TRC20",
"sourceAddress": "TQ9yLxm1yC6uX3YgYvG6S4w7HxQvQ1pNnA",
"destinationAddress": "TJ4qN2b8pW3mXvKc7RtYf5HsLd9eUa1oZG",
"hash": "8ce3e71ef8635d2bf27913bb680d7f88ad0238ea42c779c4b30f4e587d07da8e",
"blockScanUrl": "https://tronscan.org/#/transaction/8ce3e71ef8635d2bf27913bb680d7f88ad0238ea42c779c4b30f4e587d07da8e"
},
"balanceChanges": [
{
"token": "USDT",
"amount": {
"number": "50",
"unit": "USDT"
},
"before": {
"number": "1199.5",
"unit": "USDT"
},
"after": {
"number": "1249.5",
"unit": "USDT"
}
}
]
}
}