# Models

## The Currency object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"Currency":{"type":"object","properties":{"ticker":{"type":"string","description":"Currency ticker (e.g., btc)"},"network":{"type":"string","description":"Network ticker (e.g., btc, eth)"},"symbol":{"type":"string","description":"Symbol representing the currency"},"name":{"type":"string","description":"Full name of the currency"},"hasMemo":{"type":"boolean","description":"Indicates whether this currency supports memo/extraId"},"requireMemo":{"type":"boolean","description":"Indicates whether memo/extraId is required to complete transactions"},"isFiat":{"type":"boolean","description":"Shows if the currency is fiat (e.g., USD)"},"isStable":{"type":"boolean","description":"Indicates if the currency is a stablecoin"},"supportsFixedRate":{"type":"boolean","description":"True if fixed-rate exchanges are supported"},"enabled":{"type":"boolean","description":"Indicates if currency is currently available for use"},"image":{"type":"string","description":"URL to the currency icon"},"regexAddress":{"type":"string","description":"Regular expression pattern for validating recipient addresses"},"addressExplorer":{"type":"string","description":"Block explorer URL template for addresses (use {} as placeholder)"},"txExplorer":{"type":"string","description":"Block explorer URL template for transactions (use {} as placeholder)"},"confirmations":{"type":"integer","description":"Number of required confirmations for incoming transactions"},"rank":{"type":"integer","description":"Currency ranking priority (use for sorting in UI)"}}}}}}
```

## The ExchangeRate object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"ExchangeRate":{"type":"object","properties":{"min":{"type":"number","description":"Minimum allowed amount for the exchange"},"max":{"type":"number","nullable":true,"description":"Maximum allowed amount for the exchange (null means no limit)"},"fromAmount":{"type":"number","description":"Requested amount to exchange"},"toAmount":{"type":"number","description":"Estimated amount to receive"},"fromCurrency":{"type":"string","description":"Ticker of the source currency"},"toCurrency":{"type":"string","description":"Ticker of the target currency"},"fromNetwork":{"type":"string","description":"Source network"},"toNetwork":{"type":"string","description":"Target network"},"amountFromUsd":{"type":"string","description":"Amount in USD equivalent (source)"},"amountToUsd":{"type":"string","description":"Amount in USD equivalent (target)"}}}}}}
```

## The ExchangeRequest object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"ExchangeRequest":{"type":"object","properties":{"fromCurrency":{"type":"string","description":"Source currency ticker"},"fromNetwork":{"type":"string","description":"Source network"},"toCurrency":{"type":"string","description":"Target currency ticker"},"toNetwork":{"type":"string","description":"Target network"},"amountFromRequested":{"type":"string","description":"Requested amount to send"},"amountToRequested":{"type":"string","description":"Expected amount to receive"},"depositAddress":{"type":"string","description":"Address where user should send funds"},"recipientAddress":{"type":"string","description":"Address where user will receive funds"},"depositMemo":{"type":"string","nullable":true,"description":"Memo for deposit (if required)"},"recipientMemo":{"type":"string","nullable":true,"description":"Memo for recipient (if required)"},"refundAddress":{"type":"string","nullable":true,"description":"Address for refunds"},"refundMemo":{"type":"string","nullable":true,"description":"Memo for refund address"},"flow":{"type":"string","enum":["standard","fixed-rate"],"description":"Exchange flow type"}}}}}}
```

## The ExchangeDetails object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"ExchangeDetails":{"type":"object","properties":{"amountFromReceived":{"type":"string","nullable":true,"description":"Actual amount received from user"},"amountToReceived":{"type":"string","nullable":true,"description":"Actual amount sent to recipient"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current status of the exchange"},"payinHash":{"type":"string","nullable":true,"description":"Transaction hash of incoming payment"},"payoutHash":{"type":"string","nullable":true,"description":"Transaction hash of outgoing payment"},"created":{"type":"string","format":"date-time","description":"Timestamp when exchange was created"}}}}}}
```

## The StandardExchangeStatus object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"StandardExchangeStatus":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"exchangeType":{"type":"string","enum":["standard"],"description":"Type of exchange"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current exchange status"},"request":{"$ref":"#/components/schemas/ExchangeRequest"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeDetails"},"description":"Array of exchange operations"}}},"ExchangeRequest":{"type":"object","properties":{"fromCurrency":{"type":"string","description":"Source currency ticker"},"fromNetwork":{"type":"string","description":"Source network"},"toCurrency":{"type":"string","description":"Target currency ticker"},"toNetwork":{"type":"string","description":"Target network"},"amountFromRequested":{"type":"string","description":"Requested amount to send"},"amountToRequested":{"type":"string","description":"Expected amount to receive"},"depositAddress":{"type":"string","description":"Address where user should send funds"},"recipientAddress":{"type":"string","description":"Address where user will receive funds"},"depositMemo":{"type":"string","nullable":true,"description":"Memo for deposit (if required)"},"recipientMemo":{"type":"string","nullable":true,"description":"Memo for recipient (if required)"},"refundAddress":{"type":"string","nullable":true,"description":"Address for refunds"},"refundMemo":{"type":"string","nullable":true,"description":"Memo for refund address"},"flow":{"type":"string","enum":["standard","fixed-rate"],"description":"Exchange flow type"}}},"ExchangeDetails":{"type":"object","properties":{"amountFromReceived":{"type":"string","nullable":true,"description":"Actual amount received from user"},"amountToReceived":{"type":"string","nullable":true,"description":"Actual amount sent to recipient"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current status of the exchange"},"payinHash":{"type":"string","nullable":true,"description":"Transaction hash of incoming payment"},"payoutHash":{"type":"string","nullable":true,"description":"Transaction hash of outgoing payment"},"created":{"type":"string","format":"date-time","description":"Timestamp when exchange was created"}}}}}}
```

## The PrivateExchangeStatus object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"PrivateExchangeStatus":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"exchangeType":{"type":"string","enum":["private"],"description":"Type of exchange"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current exchange status"},"request":{"$ref":"#/components/schemas/ExchangeRequest"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeDetails"},"description":"Array of exchange operations"}}},"ExchangeRequest":{"type":"object","properties":{"fromCurrency":{"type":"string","description":"Source currency ticker"},"fromNetwork":{"type":"string","description":"Source network"},"toCurrency":{"type":"string","description":"Target currency ticker"},"toNetwork":{"type":"string","description":"Target network"},"amountFromRequested":{"type":"string","description":"Requested amount to send"},"amountToRequested":{"type":"string","description":"Expected amount to receive"},"depositAddress":{"type":"string","description":"Address where user should send funds"},"recipientAddress":{"type":"string","description":"Address where user will receive funds"},"depositMemo":{"type":"string","nullable":true,"description":"Memo for deposit (if required)"},"recipientMemo":{"type":"string","nullable":true,"description":"Memo for recipient (if required)"},"refundAddress":{"type":"string","nullable":true,"description":"Address for refunds"},"refundMemo":{"type":"string","nullable":true,"description":"Memo for refund address"},"flow":{"type":"string","enum":["standard","fixed-rate"],"description":"Exchange flow type"}}},"ExchangeDetails":{"type":"object","properties":{"amountFromReceived":{"type":"string","nullable":true,"description":"Actual amount received from user"},"amountToReceived":{"type":"string","nullable":true,"description":"Actual amount sent to recipient"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current status of the exchange"},"payinHash":{"type":"string","nullable":true,"description":"Transaction hash of incoming payment"},"payoutHash":{"type":"string","nullable":true,"description":"Transaction hash of outgoing payment"},"created":{"type":"string","format":"date-time","description":"Timestamp when exchange was created"}}}}}}
```

## The ExchangeStatusWrapper object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"ExchangeStatusWrapper":{"type":"object","properties":{"type":{"type":"string","enum":["standard","private"],"description":"Type of the exchange"},"exchange":{"oneOf":[{"$ref":"#/components/schemas/StandardExchangeStatus"},{"$ref":"#/components/schemas/PrivateExchangeStatus"}]}}},"StandardExchangeStatus":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"exchangeType":{"type":"string","enum":["standard"],"description":"Type of exchange"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current exchange status"},"request":{"$ref":"#/components/schemas/ExchangeRequest"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeDetails"},"description":"Array of exchange operations"}}},"ExchangeRequest":{"type":"object","properties":{"fromCurrency":{"type":"string","description":"Source currency ticker"},"fromNetwork":{"type":"string","description":"Source network"},"toCurrency":{"type":"string","description":"Target currency ticker"},"toNetwork":{"type":"string","description":"Target network"},"amountFromRequested":{"type":"string","description":"Requested amount to send"},"amountToRequested":{"type":"string","description":"Expected amount to receive"},"depositAddress":{"type":"string","description":"Address where user should send funds"},"recipientAddress":{"type":"string","description":"Address where user will receive funds"},"depositMemo":{"type":"string","nullable":true,"description":"Memo for deposit (if required)"},"recipientMemo":{"type":"string","nullable":true,"description":"Memo for recipient (if required)"},"refundAddress":{"type":"string","nullable":true,"description":"Address for refunds"},"refundMemo":{"type":"string","nullable":true,"description":"Memo for refund address"},"flow":{"type":"string","enum":["standard","fixed-rate"],"description":"Exchange flow type"}}},"ExchangeDetails":{"type":"object","properties":{"amountFromReceived":{"type":"string","nullable":true,"description":"Actual amount received from user"},"amountToReceived":{"type":"string","nullable":true,"description":"Actual amount sent to recipient"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current status of the exchange"},"payinHash":{"type":"string","nullable":true,"description":"Transaction hash of incoming payment"},"payoutHash":{"type":"string","nullable":true,"description":"Transaction hash of outgoing payment"},"created":{"type":"string","format":"date-time","description":"Timestamp when exchange was created"}}},"PrivateExchangeStatus":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"exchangeType":{"type":"string","enum":["private"],"description":"Type of exchange"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current exchange status"},"request":{"$ref":"#/components/schemas/ExchangeRequest"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeDetails"},"description":"Array of exchange operations"}}}}}}
```

## The ExchangeList object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"ExchangeList":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of exchanges"},"data":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/StandardExchangeStatus"},{"$ref":"#/components/schemas/PrivateExchangeStatus"}]},"description":"Array of exchange records"}}},"StandardExchangeStatus":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"exchangeType":{"type":"string","enum":["standard"],"description":"Type of exchange"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current exchange status"},"request":{"$ref":"#/components/schemas/ExchangeRequest"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeDetails"},"description":"Array of exchange operations"}}},"ExchangeRequest":{"type":"object","properties":{"fromCurrency":{"type":"string","description":"Source currency ticker"},"fromNetwork":{"type":"string","description":"Source network"},"toCurrency":{"type":"string","description":"Target currency ticker"},"toNetwork":{"type":"string","description":"Target network"},"amountFromRequested":{"type":"string","description":"Requested amount to send"},"amountToRequested":{"type":"string","description":"Expected amount to receive"},"depositAddress":{"type":"string","description":"Address where user should send funds"},"recipientAddress":{"type":"string","description":"Address where user will receive funds"},"depositMemo":{"type":"string","nullable":true,"description":"Memo for deposit (if required)"},"recipientMemo":{"type":"string","nullable":true,"description":"Memo for recipient (if required)"},"refundAddress":{"type":"string","nullable":true,"description":"Address for refunds"},"refundMemo":{"type":"string","nullable":true,"description":"Memo for refund address"},"flow":{"type":"string","enum":["standard","fixed-rate"],"description":"Exchange flow type"}}},"ExchangeDetails":{"type":"object","properties":{"amountFromReceived":{"type":"string","nullable":true,"description":"Actual amount received from user"},"amountToReceived":{"type":"string","nullable":true,"description":"Actual amount sent to recipient"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current status of the exchange"},"payinHash":{"type":"string","nullable":true,"description":"Transaction hash of incoming payment"},"payoutHash":{"type":"string","nullable":true,"description":"Transaction hash of outgoing payment"},"created":{"type":"string","format":"date-time","description":"Timestamp when exchange was created"}}},"PrivateExchangeStatus":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"exchangeType":{"type":"string","enum":["private"],"description":"Type of exchange"},"status":{"type":"string","enum":["pending","confirming","exchanging","sending","finished","failed","refunded"],"description":"Current exchange status"},"request":{"$ref":"#/components/schemas/ExchangeRequest"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/ExchangeDetails"},"description":"Array of exchange operations"}}}}}}
```

## The CreateExchangeResponse object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"CreateExchangeResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"status":{"type":"string","enum":["pending"],"description":"Initial exchange status"},"exchangeType":{"type":"string","enum":["standard"],"description":"Type of exchange"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"request":{"type":"object","properties":{"fromCurrency":{"type":"string"},"fromNetwork":{"type":"string"},"toCurrency":{"type":"string"},"toNetwork":{"type":"string"},"amountFromRequested":{"type":"string"},"amountToRequested":{"type":"string"},"depositAddress":{"type":"string","description":"Address where user should deposit funds"},"recipientAddress":{"type":"string","description":"Address where user will receive funds"},"flow":{"type":"string"}}},"exchanges":{"type":"array","items":{},"description":"Empty array initially, populated as exchange progresses"}}}}}}
```

## The CreatePrivateExchangeResponse object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"CreatePrivateExchangeResponse":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"exchangeType":{"type":"string","enum":["private"],"description":"Type of exchange"},"status":{"type":"string","enum":["pending"],"description":"Initial exchange status"},"request":{"type":"object","properties":{"fromCurrency":{"type":"string"},"fromNetwork":{"type":"string"},"toCurrency":{"type":"string"},"toNetwork":{"type":"string"},"amountFromRequested":{"type":"string"},"amountToRequested":{"type":"string"},"depositAddress":{"type":"string","description":"Address where user should deposit funds"},"recipientAddress":{"type":"string","description":"Address where user will receive funds"},"flow":{"type":"string"}}},"exchanges":{"type":"array","items":{},"description":"Empty array initially, populated as exchange progresses"}}}}}}
```

## The CreateExchangeRequestDto object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"CreateExchangeRequestDto":{"type":"object","properties":{"fromCurrency":{"type":"string","description":"Source currency ticker"},"toCurrency":{"type":"string","description":"Target currency ticker"},"fromNetwork":{"type":"string","description":"Source network"},"toNetwork":{"type":"string","description":"Target network"},"fromAmount":{"type":"string","description":"Amount to exchange"},"address":{"type":"string","description":"Recipient address"},"memo":{"type":"string","description":"Memo for recipient (if required)"},"refundAddress":{"type":"string","description":"Refund address"},"refundMemo":{"type":"string","description":"Refund memo"},"flow":{"type":"string","enum":["standard","fixed-rate"],"description":"Exchange flow type"},"rateId":{"type":"string","description":"RateId is needed so that you can freeze the estimate from the /rate method for fixed-rate exchange. It is valid for 1 minute from the moment it is received."}},"required":["fromCurrency","toCurrency","fromNetwork","toNetwork","fromAmount","flow"]}}}}
```

## The CreatePrivateExchangeRequestDto object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"CreatePrivateExchangeRequestDto":{"type":"object","properties":{"fromCurrency":{"type":"string","description":"Source currency ticker"},"toCurrency":{"type":"string","description":"Target currency ticker"},"fromNetwork":{"type":"string","description":"Source network"},"toNetwork":{"type":"string","description":"Target network"},"fromAmount":{"type":"string","description":"Amount to exchange"},"memo":{"type":"string","description":"Extra ID for recipient (if required)"},"privateType":{"type":"string","description":"There are two types of private exchanges: 'privatePlus' - an intermediary network for XMR only; 'efficient' - the fastest and cheapest intermediary networks."},"address":{"type":"string","description":"Recipient address"},"refundAddress":{"type":"string","description":"Refund address"},"refundMemo":{"type":"string","description":"Extra ID for refund address (if required)"}},"required":["fromCurrency","toCurrency","fromNetwork","toNetwork","fromAmount"]}}}}
```

## The SendDexApproveTransactionDto object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"SendDexApproveTransactionDto":{"type":"object","properties":{"network":{"type":"string","description":"Network name"},"rawApproveTx":{"type":"string","description":"Raw approve transaction"}},"required":["network","rawApproveTx"]}}}}
```

## The SendDexTransactionDto object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"SendDexTransactionDto":{"type":"object","properties":{"account":{"type":"string","description":"Receiver address"},"amountFrom":{"type":"string","description":"Amount sent from sender"},"amountTo":{"type":"string","description":"Amount to be received"},"fromTokenAddress":{"type":"string","description":"Source token contract address"},"toTokenAddress":{"type":"string","description":"Target token contract address"},"network":{"type":"string","description":"Network name (Currently available: eth, sol, sui, sei, arbitrum, base, bsc, cchain, celo, linea, matic, op, sonic, uni)"},"commissionPercentage":{"type":"string","description":"Commission percentage"},"rawTx":{"type":"string","description":"Raw transaction data"},"hash":{"type":"string","description":"Transaction hash"},"to":{"type":"string","description":"Recipient address (again, for compatibility)"},"isExchange":{"type":"boolean","description":"If it is an approve transaction or any other transaction other than a swap, the flag must be false."}},"required":["account","amountFrom","amountTo","fromTokenAddress","toTokenAddress","network","commissionPercentage"]}}}}
```

## The SwapDexTransactionDto object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"SwapDexTransactionDto":{"type":"object","properties":{"account":{"type":"string","description":"Sender address"},"fromTokenAddress":{"type":"string","description":"Source token contract address"},"toTokenAddress":{"type":"string","description":"Target token contract address"},"amount":{"type":"string","description":"Amount to swap"},"slippage":{"type":"string","description":"Allowed slippage"},"referrerFee":{"type":"string","description":"Referrer fee"},"network":{"type":"string","description":"Network name (Currently available: eth, sol, sui, sei, arbitrum, base, bsc, cchain, celo, linea, matic, op, sonic, uni)"}},"required":["account","fromTokenAddress","toTokenAddress","amount","slippage","referrerFee","network"]}}}}
```

## The DeFiCurrency object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"DeFiCurrency":{"type":"object","properties":{"name":{"type":"string","description":"Full name of the token"},"address":{"type":"string","description":"Token contract address"},"decimals":{"type":"integer","description":"Number of decimal places for the token"},"symbol":{"type":"string","description":"Token symbol"},"network":{"type":"string","description":"Network ticker"},"enabled":{"type":"boolean","description":"Indicates if token is currently available for swaps"},"image":{"type":"string","description":"URL to the token icon"}}}}}}
```

## The SwapDexInfo object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"SwapDexInfo":{"type":"object","properties":{"name":{"type":"string","description":"DEX name"},"address":{"type":"string","description":"DEX contract address"},"fee":{"type":"number","description":"DEX fee percentage"},"percentage":{"type":"number","description":"Percentage of swap going through this DEX"}}}}}}
```

## The SwapSubRoute object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"SwapSubRoute":{"type":"object","properties":{"from":{"type":"string","description":"Source token address in this step"},"to":{"type":"string","description":"Target token address in this step"},"dexes":{"type":"array","items":{"$ref":"#/components/schemas/SwapDexInfo"},"description":"DEXes used in this swap step"}}},"SwapDexInfo":{"type":"object","properties":{"name":{"type":"string","description":"DEX name"},"address":{"type":"string","description":"DEX contract address"},"fee":{"type":"number","description":"DEX fee percentage"},"percentage":{"type":"number","description":"Percentage of swap going through this DEX"}}}}}}
```

## The SwapRoute object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"SwapRoute":{"type":"object","properties":{"percentage":{"type":"number","description":"Percentage of total swap using this route"},"subRoutes":{"type":"array","items":{"$ref":"#/components/schemas/SwapSubRoute"},"description":"Individual steps in the swap route"}}},"SwapSubRoute":{"type":"object","properties":{"from":{"type":"string","description":"Source token address in this step"},"to":{"type":"string","description":"Target token address in this step"},"dexes":{"type":"array","items":{"$ref":"#/components/schemas/SwapDexInfo"},"description":"DEXes used in this swap step"}}},"SwapDexInfo":{"type":"object","properties":{"name":{"type":"string","description":"DEX name"},"address":{"type":"string","description":"DEX contract address"},"fee":{"type":"number","description":"DEX fee percentage"},"percentage":{"type":"number","description":"Percentage of swap going through this DEX"}}}}}}
```

## The SwapQuote object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"SwapQuote":{"type":"object","properties":{"fromAmount":{"type":"string","description":"Amount to swap from"},"usdFromAmount":{"type":"string","description":"USD value of from amount"},"toAmount":{"type":"string","description":"Estimated amount to receive"},"usdToAmount":{"type":"string","description":"USD value of to amount"},"receivedAmount":{"type":"string","description":"Actual amount user will receive after fees"},"fee":{"type":"string","description":"Fee amount"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/SwapRoute"},"description":"Swap routes with DEX details"},"priceImpact":{"type":"string","description":"Price impact percentage"}}},"SwapRoute":{"type":"object","properties":{"percentage":{"type":"number","description":"Percentage of total swap using this route"},"subRoutes":{"type":"array","items":{"$ref":"#/components/schemas/SwapSubRoute"},"description":"Individual steps in the swap route"}}},"SwapSubRoute":{"type":"object","properties":{"from":{"type":"string","description":"Source token address in this step"},"to":{"type":"string","description":"Target token address in this step"},"dexes":{"type":"array","items":{"$ref":"#/components/schemas/SwapDexInfo"},"description":"DEXes used in this swap step"}}},"SwapDexInfo":{"type":"object","properties":{"name":{"type":"string","description":"DEX name"},"address":{"type":"string","description":"DEX contract address"},"fee":{"type":"number","description":"DEX fee percentage"},"percentage":{"type":"number","description":"Percentage of swap going through this DEX"}}}}}}
```

## The DexExchange object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"DexExchange":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"updated":{"type":"string","format":"date-time","description":"Exchange last update timestamp"},"network":{"type":"string","description":"Network where exchange occurred"},"fromTokenAddress":{"type":"string","description":"Source token contract address"},"toTokenAddress":{"type":"string","description":"Target token contract address"},"amountFrom":{"type":"string","description":"Amount sent"},"amountTo":{"type":"string","description":"Amount received"},"addressFrom":{"type":"string","description":"Sender wallet address"},"addressTo":{"type":"string","nullable":true,"description":"Recipient wallet address"},"commissionPercentage":{"type":"string","description":"Commission percentage"},"status":{"type":"string","enum":["pending","confirming","finished","failed"],"description":"Exchange status"},"hash":{"type":"string","description":"Transaction hash"}}}}}}
```

## The DexExchangeList object

```json
{"openapi":"3.0.0","info":{"title":"Baltex Partner API","version":"1.0.0"},"components":{"schemas":{"DexExchangeList":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of exchanges"},"exchanges":{"type":"array","items":{"$ref":"#/components/schemas/DexExchange"},"description":"Array of DEX exchanges"}}},"DexExchange":{"type":"object","properties":{"id":{"type":"string","description":"Unique exchange identifier"},"created":{"type":"string","format":"date-time","description":"Exchange creation timestamp"},"updated":{"type":"string","format":"date-time","description":"Exchange last update timestamp"},"network":{"type":"string","description":"Network where exchange occurred"},"fromTokenAddress":{"type":"string","description":"Source token contract address"},"toTokenAddress":{"type":"string","description":"Target token contract address"},"amountFrom":{"type":"string","description":"Amount sent"},"amountTo":{"type":"string","description":"Amount received"},"addressFrom":{"type":"string","description":"Sender wallet address"},"addressTo":{"type":"string","nullable":true,"description":"Recipient wallet address"},"commissionPercentage":{"type":"string","description":"Commission percentage"},"status":{"type":"string","enum":["pending","confirming","finished","failed"],"description":"Exchange status"},"hash":{"type":"string","description":"Transaction hash"}}}}}}
```
