# API Reference

## GET /chains

> Get Chains

```json
{"openapi":"3.1.0","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Third-party Integration API"}],"servers":[{"url":"https://openapi.orbiter.finance","description":"Production"}],"security":[],"paths":{"/chains":{"get":{"summary":"Get Chains","deprecated":false,"description":"","tags":["Third-party Integration API"],"parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Request status, 'success' indicates success, 'error' indicates failure"},"message":{"type":"string","description":"Request message, empty when successful, contains error information when failed"},"result":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID, unique identifier of the blockchain network"},"internalId":{"type":"integer","description":"Internal ID, chain identifier used within the system"},"name":{"type":"string","description":"Chain name, display name of the blockchain network"},"nativeCurrency":{"type":"object","properties":{"name":{"type":"string"},"symbol":{"type":"string"},"decimals":{"type":"integer"},"coinKey":{"type":"string"},"address":{"type":"string"},"isNative":{"type":"boolean"},"paymaster":{"type":"string"}},"required":["name","symbol","decimals","coinKey","address"]},"vm":{"type":"string"}},"required":["chainId","internalId","name","nativeCurrency","vm"]}}},"required":["status","message","result"]}}},"headers":{}}}}}}}
```

## POST /quote

> Get a Quote

```json
{"openapi":"3.1.0","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Third-party Integration API"}],"servers":[{"url":"https://openapi.orbiter.finance","description":"Production"}],"security":[],"paths":{"/quote":{"post":{"summary":"Get a Quote","deprecated":false,"description":"","tags":["Third-party Integration API"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sourceChainId":{"type":"string","description":"Source chain ID, represents the blockchain network ID where the transaction originates"},"destChainId":{"type":"string","description":"Destination chain ID, represents the blockchain network ID where the transaction targets"},"sourceToken":{"type":"string","description":"Source token address, represents the token contract address where the transaction originates"},"destToken":{"type":"string","description":"Destination token address, represents the token contract address where the transaction targets"},"amount":{"type":"string","description":"Transaction amount, represents the token quantity in string format"},"userAddress":{"type":"string","description":"User wallet address, represents the blockchain address of the transaction initiator"},"targetRecipient":{"type":"string","description":"Target recipient address, represents the blockchain address of the final transaction recipient"},"slippage":{"type":"number","description":"Slippage tolerance, represents the acceptable price fluctuation percentage for the user"},"feeConfig":{"type":"object","properties":{"feeRecipient":{"type":"string","description":"Fee recipient address, represents the blockchain address where fees will be sent"},"feePercent":{"type":"string","description":"Fee percentage, represents the fee ratio in string format，"}},"required":["feeRecipient","feePercent"],"description":"Fee configuration, includes fee recipient address and fee percentage,For example, For example,For example, 1=1%"},"channel":{"type":"string","description":"Your dapp name or commission wallet address"}},"required":["sourceChainId","destChainId","sourceToken","destToken","amount","userAddress","targetRecipient"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Request status, 'success' indicates success, 'error' indicates failure"},"message":{"type":"string","description":"Request message, empty when successful, contains error information when failed"},"result":{"type":"object","properties":{"fees":{"type":"object","properties":{"withholdingFee":{"type":"string","description":"Withholding fee, represents the pre-deducted fee amount in the transaction, formatted as a string number, unit matches feeSymbol"},"withholdingFeeUSD":{"type":"string","description":"Withholding fee USD value, represents the USD amount corresponding to the withholding fee, formatted as a high-precision decimal string"},"swapFee":{"type":"string","description":"Swap fee, represents the fee generated during token exchange, formatted as a string number, '0' indicates no swap fee"},"swapFeeUSD":{"type":"string","description":"Swap fee USD value, represents the USD amount corresponding to the swap fee"},"tradeFee":{"type":"string","description":"Transaction fee, represents the handling fee generated during the transaction, formatted as a string number, unit matches feeSymbol"},"tradeFeeUSD":{"type":"string","description":"Transaction fee USD value, represents the USD amount corresponding to the transaction fee"},"totalFee":{"type":"string","description":"Total fee, represents the sum of all fees (withholding + swap + transaction), formatted as a high-precision decimal string, unit matches feeSymbol"},"priceImpactUSD":{"type":"string","description":"Price impact USD value, represents the degree of impact on market price by the transaction"},"feeSymbol":{"type":"string","description":"Fee token symbol, represents the type of token used for fee collection"}},"required":["withholdingFee","withholdingFeeUSD","swapFee","swapFeeUSD","tradeFee","tradeFeeUSD","totalFee","priceImpactUSD","feeSymbol"]},"steps":{"type":"array","description":"Transaction step details, includes all operation steps required in cross-chain transactions","items":{"type":"object","description":"Detailed information of a single transaction step","properties":{"action":{"type":"string","description":"Transaction action type, e.g. 'bridge' for cross-chain transaction, 'swap' for token exchange"},"tx":{"type":"object","description":"Transaction details, includes transaction data, target address and other information","properties":{"data":{"type":"string","description":"Transaction data, contains encoded transaction parameters, formatted as hexadecimal string"},"to":{"type":"string","description":"Target contract address for the transaction"},"value":{"type":"string","description":"Amount of tokens sent in the transaction"},"gasLimit":{"type":"string","description":"Transaction gas limit"}},"required":["data","to","value","gasLimit"]}}}},"details":{"type":"object","description":"Supplementary information for transaction details","properties":{"sourceTokenAmount":{"type":"string","description":"Source token amount, represents the amount of tokens sent in the transaction, formatted as a string number"},"destTokenAmount":{"type":"string","description":"Destination token amount, represents the amount of tokens received in the transaction"},"rate":{"type":"string","description":"Exchange rate, represents the ratio between source and destination tokens"},"slippageTolerance":{"type":"object","description":"Slippage tolerance configuration","properties":{}},"points":{"type":"integer","description":"Points reward count"},"midTokenSymbol":{"type":"string","description":"Intermediate token symbol, represents the token used during transaction processing"},"minDestTokenAmount":{"type":"string","description":"Minimum destination token amount, represents the minimum acceptable received amount for the user"}},"required":["sourceTokenAmount","destTokenAmount","rate","slippageTolerance","points","midTokenSymbol","minDestTokenAmount"]}},"required":["fees","steps","details"]}},"required":["status","message","result"]}}},"headers":{}}}}}}}
```

## GET /transaction/{hash}

> Query Transaction

```json
{"openapi":"3.1.0","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Third-party Integration API"}],"servers":[{"url":"https://openapi.orbiter.finance","description":"Production"}],"security":[],"paths":{"/transaction/{hash}":{"get":{"summary":"Query Transaction","deprecated":false,"description":"","tags":["Third-party Integration API"],"parameters":[{"name":"hash","in":"path","description":"Transaction hash, represents the hash value of the transaction to be queried","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Request status, 'success' indicates success, 'error' indicates failure"},"message":{"type":"string","description":"Request message, empty when successful, contains error information when failed"},"result":{"type":"object","properties":{"chainId":{"type":"string"},"hash":{"type":"string"},"sender":{"type":"string"},"receiver":{"type":"string"},"amount":{"type":"string"},"symbol":{"type":"string"},"timestamp":{"type":"string"},"status":{"type":"integer","description":"On-chain transaction status: 2=success, 3=failure"},"opStatus":{"type":"integer","description":"0=UserTxPendingConfirm,1 = Waiting for payment, 80 = Refund successful, 96 = Entering payment, 97 = Return waiting for recovery, 98 = Payment successful, pending confirmation, 99 = Payment confirmation successful."},"targetId":{"type":"string"},"targetAmount":{"type":"string"},"targetSymbol":{"type":"string"},"targetChain":{"type":"string"},"points":{"type":"string"},"targetAddress":{"type":"string"}},"required":["chainId","hash","sender","receiver","amount","symbol","timestamp","status","opStatus","targetId","targetAmount","targetSymbol","targetChain","points","targetAddress"]}},"required":["status","message","result"]}}},"headers":{}}}}}}}
```

## GET /transaction/address/{address}

> Query Transaction History

```json
{"openapi":"3.1.0","info":{"title":"Default module","version":"1.0.0"},"tags":[{"name":"Third-party Integration API"}],"servers":[{"url":"https://openapi.orbiter.finance","description":"Production"}],"security":[],"paths":{"/transaction/address/{address}":{"get":{"summary":"Query Transaction History","deprecated":false,"description":"","tags":["Third-party Integration API"],"parameters":[{"name":"address","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Request status, 'success' indicates success, 'error' indicates failure"},"message":{"type":"string","description":"Request message, empty when successful, contains error information when failed"},"result":{"type":"object","properties":{"offset":{"type":"integer"},"limit":{"type":"integer"},"rows":{"type":"array","items":{"type":"object","properties":{"sourceId":{"type":"string"},"targetId":{"type":"string"},"sourceToken":{"type":"string"},"targetToken":{"type":"string"},"sourceChain":{"type":"string"},"targetChain":{"type":"string"},"sourceAmount":{"type":"string"},"targetAmount":{"type":"string"},"finalAmount":{"type":["string","null"]},"sourceMaker":{"type":"string"},"sourceAddress":{"type":"string"},"targetAddress":{"type":"string"},"originSymbol":{"type":["string","null"]},"originToken":{"type":["string","null"]},"originAmount":{"type":["string","null"]},"finalSymbol":{"type":["string","null"]},"finalToken":{"type":["string","null"]},"sourceSymbol":{"type":"string"},"targetSymbol":{"type":"string"},"status":{"type":"integer"},"sourceTime":{"type":"string"},"targetTime":{"type":"string"},"points":{"type":"string"},"txType":{"type":"string"},"sourceTokenInfo":{"type":"object","properties":{"chainId":{"type":"integer"},"address":{"type":"string"},"decimals":{"type":"integer"},"name":{"type":"string"},"symbol":{"type":"string"},"logoURI":{"type":"string"},"coinKey":{"type":"string"}},"required":["chainId","address","decimals","name","symbol","logoURI","coinKey"]},"targetTokenInfo":{"type":"object","properties":{"chainId":{"type":["integer","string"]},"address":{"type":"string"},"decimals":{"type":"integer"},"name":{"type":"string"},"symbol":{"type":"string"},"logoURI":{"type":"string"},"coinKey":{"type":"string"}},"required":["chainId","address","decimals","name","symbol","logoURI","coinKey"]}},"required":["sourceId","targetId","sourceToken","targetToken","sourceChain","targetChain","sourceAmount","targetAmount","finalAmount","sourceMaker","sourceAddress","targetAddress","originSymbol","originToken","originAmount","finalSymbol","finalToken","sourceSymbol","targetSymbol","status","sourceTime","targetTime","points","txType","sourceTokenInfo","targetTokenInfo"]}},"count":{"type":"integer"}},"required":["offset","limit","rows","count"]}},"required":["status","message","result"]}}},"headers":{}}}}}}}
```
