⚡ Titan Swap API
Простые и сверхэффективные свапы в сети TON. Начните всего за 30 минут.
Creates messages to send swap on-chain using sendTransaction
-like methods. Should be used in combination with the response object from /v1/quote
.
Address of the user who is sending the transaction
Optional address to where the tokens should be sent to. This defaults to senderAddress
Messages to send on-chain for a swap
Bad request
Internal server error
POST /v1/swap-messages HTTP/1.1
Host: api.titan.tg
Content-Type: application/json
Accept: */*
Content-Length: 438
{
"senderAddress": "text",
"destinationAddress": "text",
"swapDetails": {
"amountIn": "text",
"expectedAmountOut": "text",
"minimumAmountOut": "text",
"inputMint": "text",
"outputMint": "text",
"pathDetails": [
{
"poolSource": "text",
"path": [
"text"
],
"edges": [
{
"poolAddress": "text",
"poolAmm": "text",
"poolType": "text",
"tokenIn": "text",
"tokenOut": "text",
"poolTokenInBalance": "text",
"poolTokenOutBalance": "text",
"poolFeeBps": "text",
"minimumAmountOut": "text"
}
]
}
]
}
}
{
"validUntil": 1,
"messages": [
{
"address": "text",
"amount": "text",
"sendMode": 1,
"payload": "text"
}
]
}
Get a quote to swap one token to another
The input mint address. Can be user friendly format, or raw.
The output mint address. Can be user friendly format, or raw.
The amount to swap. Must be in raw format.
The maximum number of split paths. There can be up to this many simultaneous swaps in one transaction.
The maximum edge length. This is the maximum number of hops allowed.
Slippage allowed in basis points eg. 250 is 2.5% slippage
DEXs that can be used to route the swap. Comma separated values eg DeDust,StonFi
Minimum liquidity in USD for each pool to be used in the swap
Quote for a swap
Bad request
Internal server error
GET /v1/quote HTTP/1.1
Host: api.titan.tg
Accept: */*
{
"amountIn": "text",
"expectedAmountOut": "text",
"minimumAmountOut": "text",
"inputMint": "text",
"outputMint": "text",
"pathDetails": [
{
"path": [
"text"
],
"poolSource": "text",
"estimatedGasCost": "text",
"edges": [
{
"poolAddress": "text",
"poolAmm": "text",
"poolType": "text",
"routerAddress": "text",
"tokenIn": "text",
"tokenOut": "text",
"poolTokenInBalance": "text",
"poolTokenOutBalance": "text",
"poolFeeBps": "text",
"amountIn": "text",
"amountOut": "text",
"minimumAmountOut": "text"
}
],
"amountIn": "text",
"amountOut": "text",
"minimumAmountOut": "text",
"percent": 1
}
]
}
Get current token price in USD and TON
A valid TON address for which to get the price
Prices for a token in TON and USD
Token not found
Internal server error
GET /v1/price HTTP/1.1
Host: api.titan.tg
Accept: */*
{
"priceUsd": "text",
"priceTon": "text"
}
Retrieve the swap history for a specific user address, with pagination support
The user's wallet address
Page number for paginated results, starting at 1
1
An array of swap records for the given user
Invalid request parameters.
User not found.
GET /v1/user/{address}/swaps HTTP/1.1
Host: api.titan.tg
Accept: */*
[
{
"txHash": "text",
"status": "text",
"senderAddress": "text",
"destinationAddress": "text",
"failureReason": "text",
"tokenIn": {
"address": "text",
"name": "text",
"symbol": "text",
"image": "https://example.com",
"decimals": 1
},
"tokenOut": {
"address": "text",
"name": "text",
"symbol": "text",
"image": "https://example.com",
"decimals": 1
},
"amountInRaw": "text",
"amountOutRaw": "text",
"poolSource": "text",
"createdAt": "2025-08-09T21:20:40.386Z",
"completedAt": "2025-08-09T21:20:40.386Z"
}
]
Gets the original quote details for a transaction based on its unique hash
The hash of the transaction you want the quote for
Quote for a swap
Transaction not found
Internal server error
GET /v1/transaction/{txHash}/quote HTTP/1.1
Host: api.titan.tg
Accept: */*
{
"amountIn": "text",
"expectedAmountOut": "text",
"minimumAmountOut": "text",
"inputMint": "text",
"outputMint": "text",
"pathDetails": [
{
"path": [
"text"
],
"poolSource": "text",
"estimatedGasCost": "text",
"edges": [
{
"poolAddress": "text",
"poolAmm": "text",
"poolType": "text",
"routerAddress": "text",
"tokenIn": "text",
"tokenOut": "text",
"poolTokenInBalance": "text",
"poolTokenOutBalance": "text",
"poolFeeBps": "text",
"amountIn": "text",
"amountOut": "text",
"minimumAmountOut": "text"
}
],
"amountIn": "text",
"amountOut": "text",
"minimumAmountOut": "text",
"percent": 1
}
]
}