⚡ Titan Swap API
Простые и сверхэффективные свапы в сети TON. Начните всего за 30 минут.
Простые и сверхэффективные свапы в сети TON. Начните всего за 30 минут.
Get current token price in USD and TON
A valid TON address for which to get the price
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
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-06-21T11:17:45.012Z",
"completedAt": "2025-06-21T11:17:45.012Z"
}
]
Gets the original quote details for a transaction based on its unique hash
The hash of the transaction you want the quote for
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
}
]
}
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
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
}
]
}
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
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"
}
]
}