--- openapi: 3.1.0 info: title: "" description: an example API version: "" servers: - url: "https://api.flatqube.io/v1" description: production - url: "https://api-test.flatqube.io/v1" description: test paths: /swagger.yaml: get: tags: - swagger /pairs/: post: tags: - pairs requestBody: content: application/json: schema: $ref: "#/components/schemas/PairsRequest" required: true responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/PairsResponseV1" "/pairs/address/{address}": post: tags: - pairs responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/PairResponseV1" "/pairs/left/{left_address}/right/{right_address}": post: tags: - pairs responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/PairResponseV1" "/pairs/left/{left_address}/right/{right_address}/ohlcv": post: tags: - pairs requestBody: content: application/json: schema: $ref: "#/components/schemas/PairOhlcvRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/OhlcvResponse" "/pairs/address/{address}/ohlcv": post: tags: - pairs requestBody: content: application/json: schema: $ref: "#/components/schemas/PairOhlcvRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/OhlcvResponse" "/pairs/address/{address}/volume": post: tags: - pairs requestBody: content: application/json: schema: $ref: "#/components/schemas/PairVolumeRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" "/pairs/address/{address}/tvl": post: tags: - pairs requestBody: content: application/json: schema: $ref: "#/components/schemas/PairTvlRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" "/pairs/address/{address}/fee": post: tags: - pairs requestBody: content: application/json: schema: $ref: "#/components/schemas/PairFeeRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" /pairs/cross_pairs: post: tags: - pairs requestBody: content: application/json: schema: $ref: "#/components/schemas/CrossPairsRequest" required: true responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/PairsResponseV1" /pairs/new_cross_pairs: post: tags: - pairs requestBody: content: application/json: schema: $ref: "#/components/schemas/NewCrossPairsRequest" required: true responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/CrossChainResponse" /pairs/meta: get: tags: - pairs responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/PairMetaResponseV1" /currencies/: post: tags: - currencies requestBody: content: application/json: schema: $ref: "#/components/schemas/CurrenciesRequest" required: true responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/CurrenciesResponse" "/currencies/{currency_address}": post: tags: - currencies responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/CurrencyInfoResponse" "/currencies/{currency_address}/prices": post: tags: - currencies requestBody: content: application/json: schema: $ref: "#/components/schemas/CurrenciesPricesRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/OhlcvResponse" "/currencies/{currency_address}/volume": post: tags: - currencies requestBody: content: application/json: schema: $ref: "#/components/schemas/CurrenciesVolumeRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" "/currencies/{currency_address}/tvl": post: tags: - currencies requestBody: content: application/json: schema: $ref: "#/components/schemas/CurrenciesTvlRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" "/currencies/{currency_address}/fee": post: tags: - currencies requestBody: content: application/json: schema: $ref: "#/components/schemas/CurrenciesFeeRequest" required: true responses: "200": description: "" content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" /transactions/: post: tags: - transactions requestBody: content: application/json: schema: $ref: "#/components/schemas/TransactionsRequest" required: true responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/TransactionsInfoResponseV1" /cmc/dex: get: tags: - cmc responses: "200": description: "" content: application/json: schema: type: object additionalProperties: $ref: "#/components/schemas/CmcDexPoolInfoResponse" /cmc/farming: get: tags: - cmc responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/CmcFarmingPoolsResponse" /cmc/graphql: post: tags: - cmc summary: Graphql description: "UI /v1/cmc/graphiql\n\nAPI route /v1/cmc/graphql\n" responses: "200": description: "" content: application/json: schema: $ref: "#/components/schemas/GqlSwapsResponse" /currencies_usdt_prices: post: tags: - currencies requestBody: content: application/json: schema: $ref: "#/components/schemas/CurrenciesUsdtPricesRequest" required: true responses: "200": description: "" content: application/json: schema: type: object additionalProperties: type: number components: schemas: BridgeIndexerCurrencyInfoResponse: type: object required: - currency - currency_price - currency_scale properties: currency: type: string currency_price: examples: - "1.337" type: string currency_scale: type: integer format: int32 CmcDexPoolInfoResponse: type: object required: - base_id - base_name - base_symbol - base_volume - last_price - quote_id - quote_name - quote_symbol - quote_volume properties: base_id: type: string base_name: type: string base_symbol: type: string base_volume: examples: - "1.337" type: string last_price: examples: - "1.337" type: string quote_id: type: string quote_name: type: string quote_symbol: type: string quote_volume: examples: - "1.337" type: string CmcFarmingPoolInfoResponse: type: object required: - apr - logo - name - pair - pairLink - poolRewards - totalStake properties: apr: examples: - "1.337" type: string logo: type: string name: type: string pair: type: string pairLink: type: string poolRewards: type: array items: type: string totalStake: examples: - "1.337" type: string CmcFarmingPoolsResponse: type: object required: - links - pools - provider - provider_URL - provider_logo properties: links: type: array items: $ref: "#/components/schemas/CmcLinkResponse" pools: type: array items: $ref: "#/components/schemas/CmcFarmingPoolInfoResponse" provider: type: string provider_URL: type: string provider_logo: type: string CmcLinkResponse: type: object required: - link - title properties: link: type: string title: type: string CrossChainCurrencyInfoResponse: type: object required: - amount - currencyAddress properties: amount: type: integer format: uint128 minimum: 0.0 currencyAddress: type: string CrossChainPairInfoResponse: type: object required: - leftAddress - pairAddress - rightAddress properties: leftAddress: type: string pairAddress: type: string rightAddress: type: string CrossChainResponse: type: object required: - currencies - pairs properties: currencies: type: array items: $ref: "#/components/schemas/CrossChainCurrencyInfoResponse" pairs: type: array items: $ref: "#/components/schemas/CrossChainPairInfoResponse" CrossPairsRequest: type: object required: - fromCurrencyAddress - toCurrencyAddresses properties: fromCurrencyAddress: type: string toCurrencyAddresses: type: array items: type: string CrossSwapKind: type: string enum: - expectedexchange - expectedspendamount CrossSwapSilentInput: type: object required: - amounts - receiveCurrencyAddress - spendCurrencyAddress properties: amounts: type: array items: type: string receiveCurrencyAddress: type: string spendCurrencyAddress: type: string CrossSwapSilentResponse: type: object required: - receiveAmount - steps properties: receiveAmount: type: string steps: type: array items: $ref: "#/components/schemas/CrossSwapStepSilentResponse" CrossSwapSilentVecRequest: type: object required: - deep - inputCurrenciesMeta - minTvl - whiteListCurrencies properties: deep: type: integer format: int32 inputCurrenciesMeta: type: array items: $ref: "#/components/schemas/CrossSwapSilentInput" minTvl: examples: - "1.337" type: string slippage: examples: - "1.337" type: - string - "null" whiteListCurrencies: type: array items: type: string whiteListUri: type: - string - "null" CrossSwapStepSilentResponse: type: object required: - actionType - fee - minimumReceiveAmount - poolAddress - receiveCurrencyAddress - spendAmount - spendCurrencyAddress properties: actionType: type: string fee: type: string minimumReceiveAmount: type: string poolAddress: type: string priceImpact: type: - string - "null" receiveCurrencyAddress: type: string spendAmount: type: string spendCurrencyAddress: type: string CurrenciesFeeRequest: type: object required: - from - timeframe - to properties: from: type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: type: integer format: int64 CurrenciesPricesRequest: type: object required: - from - timeframe - to properties: from: type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: type: integer format: int64 CurrenciesRequest: type: object required: - limit - offset properties: currencyAddresses: type: - array - "null" items: type: string limit: type: integer format: int64 offset: type: integer format: int64 ordering: anyOf: - $ref: "#/components/schemas/CurrencyOrdering" - type: "null" whiteListUri: type: - string - "null" CurrenciesResponse: type: object required: - count - currencies - offset - totalCount properties: count: type: integer format: int64 currencies: type: array items: $ref: "#/components/schemas/CurrencyInfoResponse" offset: type: integer format: int64 totalCount: type: integer format: int64 CurrenciesTvlRequest: type: object required: - from - timeframe - to properties: from: type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: type: integer format: int64 CurrenciesUsdtPricesRequest: type: object required: - currency_addresses properties: currency_addresses: type: array items: type: string CurrenciesVolumeRequest: type: object required: - from - timeframe - to properties: from: type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: type: integer format: int64 CurrencyDataResponse: type: object required: - data - timestamp properties: data: type: number timestamp: type: integer format: int64 CurrencyInfoRequest: type: object required: - currency_address - timestamp_block properties: currency_address: type: string timestamp_block: type: integer format: int32 CurrencyInfoResponse: type: object required: - address - currency - fee24h - price - priceChange - transactionsCount24h - tvl - tvlChange - volume24h - volume7d - volumeChange24h properties: address: type: string currency: type: string fee24h: examples: - "1.337" type: string price: examples: - "1.337" type: string priceChange: examples: - "1.337" type: string transactionsCount24h: type: integer format: int64 tvl: examples: - "1.337" type: string tvlChange: examples: - "1.337" type: string volume24h: examples: - "1.337" type: string volume7d: examples: - "1.337" type: string volumeChange24h: examples: - "1.337" type: string CurrencyOrdering: type: string enum: - tvlascending - tvldescending - volume24hascending - volume24hdescending - priceascending - pricedescending - pricechangeascending - pricechangedescending DexPairByTokenRootInfoRequest: type: object required: - token_root_address properties: token_root_address: type: string DexPairByTokenRootInfoResponse: type: object required: - left_address - left_currency - left_scale - lp_address - lp_currency - lp_scale - right_address - right_currency - right_scale properties: dex_pool_address: type: - string - "null" left_address: type: string left_currency: type: string left_scale: type: integer format: int32 lp_address: type: string lp_currency: type: string lp_scale: type: integer format: int32 right_address: type: string right_currency: type: string right_scale: type: integer format: int32 DexPairInfoRequest: type: object required: - timestamp_block - token_root_address properties: timestamp_block: type: integer format: int32 token_root_address: type: string DexPairInfoResponse: type: object required: - created_at - dex_pool_address - left_address - left_balance - left_currency - left_price - lp_balance - lp_price - right_address - right_balance - right_currency - right_price - timestamp_block - tvl properties: created_at: type: integer format: int64 dex_pool_address: type: string left_address: type: string left_balance: examples: - "1.337" type: string left_currency: type: string left_price: examples: - "1.337" type: string lp_balance: examples: - "1.337" type: string lp_price: examples: - "1.337" type: string right_address: type: string right_balance: examples: - "1.337" type: string right_currency: type: string right_price: examples: - "1.337" type: string timestamp_block: type: integer format: int32 tvl: examples: - "1.337" type: string DexPairInfoWithRewardRequest: type: object required: - lp_address - reward_addresses - timestamp_block properties: lp_address: type: string reward_addresses: type: array items: type: string timestamp_block: type: integer format: int32 DexPairInfoWithRewardResponse: type: object required: - dex_pair_info - reward_prices properties: dex_pair_info: $ref: "#/components/schemas/DexPairInfoResponse" reward_prices: type: object additionalProperties: type: number EventType: type: string enum: - swaplefttoright - swaprighttoleft - deposit - withdraw GqlPair: type: object required: - fromToken - toToken properties: fromToken: $ref: "#/components/schemas/GqlToken" toToken: $ref: "#/components/schemas/GqlToken" GqlSwap: type: object required: - fromAmount - id - pair - timestamp - toAmount properties: fromAmount: type: string id: type: string pair: $ref: "#/components/schemas/GqlPair" timestamp: type: string toAmount: type: string GqlSwapsResponse: type: object required: - swaps properties: swaps: type: array items: $ref: "#/components/schemas/GqlSwap" GqlToken: type: object required: - decimals - symbol - tradeVolume properties: decimals: type: integer format: int32 symbol: type: string tradeVolume: type: string NewCrossPairsRequest: type: object required: - amount - deep - direction - fromCurrencyAddress - minTvl - toCurrencyAddress - whiteListCurrencies properties: amount: type: string deep: type: integer format: int32 direction: $ref: "#/components/schemas/CrossSwapKind" fromCurrencyAddress: type: string minTvl: examples: - "1.337" type: string slippage: examples: - "1.337" type: - string - "null" toCurrencyAddress: type: string whiteListCurrencies: type: array items: type: string whiteListUri: type: - string - "null" OhlcvResponse: type: object required: - close - high - low - open - timestamp - volume properties: close: examples: - "1.337" type: string high: examples: - "1.337" type: string low: examples: - "1.337" type: string open: examples: - "1.337" type: string timestamp: type: integer format: int64 volume: examples: - "1.337" type: string PairAddress: type: object required: - poolAddress properties: poolAddress: type: string PairBalanceInfoLegacy: type: object required: - change24h - changeTvl - count24hTransactions - createdAt - fee24h - fee7d - feeAllTime - feeDenominator - feeNumerator - feePart - leftAddress - leftCurrency - leftScale - leftVolume - lpAddress - lpCurrency - lpScale - lpVolume - pairType - poolAddress - price - rightAddress - rightCurrency - rightScale - rightVolume - timestampBlock - trueTvl - tvExec - tvl - usdtFeeExec - volume24h - volume7d properties: change24h: type: number changeTvl: type: number count24hTransactions: type: integer format: int64 createdAt: type: integer format: int64 fee24h: type: number fee7d: type: number feeAllTime: type: number feeBeneficiaryAddress: type: - string - "null" feeBeneficiaryNumerator: type: - number - "null" feeDenominator: type: number feeNumerator: type: number feePart: type: number leftAddress: type: string leftCurrency: type: string leftScale: type: integer format: uint32 minimum: 0.0 leftVolume: type: number lpAddress: type: string lpCurrency: type: string lpScale: type: integer format: uint32 minimum: 0.0 lpVolume: type: number pairType: $ref: "#/components/schemas/PairType" poolAddress: type: string price: type: number rightAddress: type: string rightCurrency: type: string rightScale: type: integer format: uint32 minimum: 0.0 rightVolume: type: number timestampBlock: type: integer format: int32 trueTvl: type: number tvExec: type: number tvl: type: number usdtFeeExec: type: number volume24h: type: number volume7d: type: number PairFeeRequest: type: object required: - from - timeframe - to properties: from: type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: type: integer format: int64 PairMetaResponseV1: type: object required: - base - baseAddress - counter - counterAddress - fee - lpAddress - pairType - poolAddress properties: base: type: string baseAddress: type: string beneficiaryAddress: type: - string - "null" counter: type: string counterAddress: type: string fee: type: number feeBeneficiary: examples: - "1.337" type: - string - "null" lpAddress: type: string pairType: $ref: "#/components/schemas/PairType" poolAddress: type: string PairOhlcvRequest: type: object required: - from - timeframe - to properties: from: type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: type: integer format: int64 PairOrdering: type: string enum: - tvlascending - tvldescending - volume24hascending - volume24hdescending - volume7dascending - volume7ddescending PairResponseV1: type: object required: - fee24h - fee7d - feeAllTime - leftLocked - leftPrice - lpLocked - meta - rightLocked - rightPrice - tvl - tvlChange - volume24h - volume7d - volumeChange24h properties: fee24h: examples: - "1.337" type: string fee7d: examples: - "1.337" type: string feeAllTime: examples: - "1.337" type: string leftLocked: examples: - "1.337" type: string leftPrice: examples: - "1.337" type: string lpLocked: examples: - "1.337" type: string meta: $ref: "#/components/schemas/PairMetaResponseV1" oneLeftToRight: examples: - "1.337" type: - string - "null" oneRightToLeft: examples: - "1.337" type: - string - "null" rightLocked: examples: - "1.337" type: string rightPrice: examples: - "1.337" type: string tvl: examples: - "1.337" type: string tvlChange: examples: - "1.337" type: string volume24h: examples: - "1.337" type: string volume7d: examples: - "1.337" type: string volumeChange24h: examples: - "1.337" type: string PairTvlRequest: type: object required: - from - timeframe - to properties: from: type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: type: integer format: int64 PairType: type: string enum: - default - stable PairVolumeRequest: type: object required: - from - timeframe - to properties: from: type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: type: integer format: int64 PairsRequest: type: object required: - limit - offset properties: currencyAddress: type: - string - "null" currencyAddresses: type: - array - "null" items: type: string favoritePools: type: - array - "null" items: type: string limit: type: integer format: int64 offset: type: integer format: int64 ordering: anyOf: - $ref: "#/components/schemas/PairOrdering" - type: "null" tvlAmountGe: examples: - "1.337" type: - string - "null" tvlAmountLe: examples: - "1.337" type: - string - "null" whiteListUri: type: - string - "null" PairsResponseV1: type: object required: - count - offset - pairs - totalCount properties: count: type: integer format: int64 offset: type: integer format: int64 pairs: type: array items: $ref: "#/components/schemas/PairResponseV1" totalCount: type: integer format: int64 PoolFullInfoResponseV1: type: object required: - basePrice - counterPrice - lpPrice - pairAddresses - pairBalance - tvl properties: basePrice: examples: - "1.337" type: string counterPrice: examples: - "1.337" type: string lpPrice: examples: - "1.337" type: string pairAddresses: $ref: "#/components/schemas/PairAddress" pairBalance: $ref: "#/components/schemas/PairBalanceInfoLegacy" tvl: examples: - "1.337" type: string Timeframe: type: string enum: - H1 - D1 TransactionInfoResponseV1: type: object required: - eventType - left - leftAddress - leftValue - lp - lpAddress - lpValue - messageHash - poolAddress - right - rightAddress - rightValue - timestampBlock - transactionHash - tv - userAddress properties: eventType: $ref: "#/components/schemas/EventType" fee: type: - number - "null" feeCurrency: type: - string - "null" left: type: string leftAddress: type: string leftValue: examples: - "1.337" type: string lp: type: string lpAddress: type: string lpValue: examples: - "1.337" type: string messageHash: type: string poolAddress: type: string right: type: string rightAddress: type: string rightValue: examples: - "1.337" type: string secondFee: examples: - "1.337" type: - string - "null" secondFeeCurrency: type: - string - "null" timestampBlock: type: integer format: int32 transactionHash: type: string tv: examples: - "1.337" type: string userAddress: type: string TransactionsInfoResponseV1: type: object required: - count - offset - totalCount - transactions properties: count: type: integer format: int64 offset: type: integer format: int64 totalCount: type: integer format: int64 transactions: type: array items: $ref: "#/components/schemas/TransactionInfoResponseV1" TransactionsOrdering: type: string enum: - blocktimeascending - blocktimedescending - fromexecascending - fromexecdescending - toexecascending - toexecdescending - tvascending - tvdescending TransactionsRequest: type: object required: - limit - offset properties: createdAtGe: type: - integer - "null" format: int64 createdAtLe: type: - integer - "null" format: int64 currencyAddress: type: - string - "null" currencyAddresses: type: - array - "null" items: type: string displayTotalCount: type: - boolean - "null" eventType: type: - array - "null" items: $ref: "#/components/schemas/EventType" leftAmountGe: examples: - "1.337" type: - string - "null" leftAmountLe: examples: - "1.337" type: - string - "null" limit: type: integer format: int64 offset: type: integer format: int64 ordering: anyOf: - $ref: "#/components/schemas/TransactionsOrdering" - type: "null" poolAddress: type: - string - "null" rightAmountGe: examples: - "1.337" type: - string - "null" rightAmountLe: examples: - "1.337" type: - string - "null" timestampBlockGe: type: - integer - "null" format: int64 timestampBlockLe: type: - integer - "null" format: int64 tvGe: examples: - "1.337" type: - string - "null" tvLe: examples: - "1.337" type: - string - "null" userAddress: type: - string - "null" whiteListUri: type: - string - "null"