⚡ Titan Swap API

Простые и сверхэффективные свапы в сети TON. Начните всего за 30 минут.

Post swap messages

post

Creates messages to send swap on-chain using sendTransaction-like methods. Should be used in combination with the response object from /v1/quote.

Body
senderAddressstringOptional

Address of the user who is sending the transaction

destinationAddressstringOptional

Optional address to where the tokens should be sent to. This defaults to senderAddress

Responses
200

Messages to send on-chain for a swap

application/json
post
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 swap quote

get

Get a quote to swap one token to another

Query parameters
inputMintstringRequired

The input mint address. Can be user friendly format, or raw.

outputMintstringRequired

The output mint address. Can be user friendly format, or raw.

amountstringRequired

The amount to swap. Must be in raw format.

maxSplitPathsnumberOptional

The maximum number of split paths. There can be up to this many simultaneous swaps in one transaction.

maxEdgeLengthnumberOptional

The maximum edge length. This is the maximum number of hops allowed.

slippageBpsstringOptional

Slippage allowed in basis points eg. 250 is 2.5% slippage

dexsstringOptional

DEXs that can be used to route the swap. Comma separated values eg DeDust,StonFi

minPoolLiquiditynumberOptional

Minimum liquidity in USD for each pool to be used in the swap

Responses
200

Quote for a swap

application/json
get
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 tokens

get

Get a list of all swappable tokens

Responses
200

Success

application/json
Responsestring[]
get
GET /v1/tokens HTTP/1.1
Host: api.titan.tg
Accept: */*
[
  "text"
]

Get DEXs

get

Get a list of all supported DEXs

Responses
200

Success

application/json
Responsestring[]
get
GET /v1/dexs HTTP/1.1
Host: api.titan.tg
Accept: */*
[
  "text"
]

Get token price

get

Get current token price in USD and TON

Query parameters
tokenstringRequired

A valid TON address for which to get the price

Responses
200

Prices for a token in TON and USD

application/json
get
GET /v1/price HTTP/1.1
Host: api.titan.tg
Accept: */*
{
  "priceUsd": "text",
  "priceTon": "text"
}

Get user's swap history

get

Retrieve the swap history for a specific user address, with pagination support

Path parameters
addressstringRequired

The user's wallet address

Query parameters
pageinteger · min: 1Optional

Page number for paginated results, starting at 1

Default: 1
Responses
200

An array of swap records for the given user

application/json
get
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"
  }
]

Get the quote for a specific transaction

get

Gets the original quote details for a transaction based on its unique hash

Path parameters
txHashstringRequired

The hash of the transaction you want the quote for

Responses
200

Quote for a swap

application/json
get
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
    }
  ]
}