--- openapi: 3.0.3 info: title: Dex Api description: This API allows you to get the information for Dex version: 1.0.0 tags: - name: cmc - name: currencies - name: pairs - name: transactions servers: - url: "https://api.flatqube.io" - url: "https://api-test.flatqube.io" paths: /v1/transactions: post: tags: - transactions summary: Transactions data description: Get Transactions data. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/TransactionsRequest" responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/TransactionsInfoResponseV1" /v1/pairs: post: tags: - pairs summary: Pairs data description: Get all Pairs data. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/PairsRequest" responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/PairsResponseV1" "/v1/pairs/address/{address}": post: tags: - pairs summary: Pair data description: Get pair data info by lp address. responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/PairResponseV1" parameters: - name: address in: path required: true schema: type: string /v1/pairs/cross_pairs: post: tags: - pairs summary: Cross pairs description: Get cross pairs data. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/CrossPairsRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/PairResponseV1" /v1/pairs/new_cross_pairs: post: tags: - pairs summary: New cross pairs description: Get cross pairs data. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/NewCrossPairsRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/CrossChainResponse" "/v1/pairs/left/{left}/right/{right}": post: tags: - pairs summary: Pair data description: Get pair data info by token root addresses. responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/PairResponseV1" parameters: - name: left in: path required: true schema: type: string - name: right in: path required: true schema: type: string "/v1/pairs/left/{left}/right/{right}/ohlcv": post: tags: - pairs summary: Ohlcv Pair data description: Get ohlcv pair data info by token root addresses. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/PairOhlcvRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/OhlcvResponse" parameters: - name: left in: path required: true schema: type: string - name: right in: path required: true schema: type: string "/v1/pairs/address/{address}/ohlcv": post: tags: - pairs summary: Ohlcv Pair data description: Get ohlcv pair data info by lp address. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/PairOhlcvRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/OhlcvResponse" parameters: - name: address in: path required: true schema: type: string "/v1/pairs/address/{address}/volume": post: tags: - pairs summary: Pair volume data description: Get pair volume data info. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/PairVolumeRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" parameters: - name: address in: path required: true schema: type: string "/v1/pairs/address/{address}/tvl": post: tags: - pairs summary: Pair tvl data description: Get pair tvl data info. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/PairTvlRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" parameters: - name: address in: path required: true schema: type: string "/v1/currencies/{currencies}": post: tags: - currencies summary: Currency data description: Get currency data info by token root address. responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/CurrencyInfoResponse" parameters: - name: currencies in: path required: true schema: type: string /v1/currencies_usdt_prices: post: tags: - currencies summary: Currencies prices description: Get currencies prices by token root address. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/CurrenciesUsdtPricesRequest" responses: 200: description: OK content: application/json: schema: type: object additionalProperties: type: string /v1/currencies: post: tags: - currencies summary: All Currencies data description: Get currency data info. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/CurrenciesRequest" responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/CurrenciesResponse" "/v1/currencies/{currencies}/prices": post: tags: - currencies summary: Currency prices data description: Get currency price data info. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/CurrenciesPricesRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/OhlcvResponse" parameters: - name: currencies in: path required: true schema: type: string "/v1/currencies/{currencies}/volume": post: tags: - currencies summary: Currency volume data description: Get currency volume data info. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/CurrenciesVolumeRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" parameters: - name: currencies in: path required: true schema: type: string "/v1/currencies/{currencies}/tvl": post: tags: - currencies summary: Currency tvl data description: Get currency tvl data info. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/CurrenciesTvlRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/CurrencyDataResponse" parameters: - name: currencies in: path required: true schema: type: string /v1/cmc/dex: get: tags: - cmc summary: Cmc dex pools info description: Get dex pools info. responses: 200: description: OK content: application/json: schema: type: object additionalProperties: $ref: "#/components/schemas/CmcDexPoolInfoResponse" /v1/cmc/farming: get: tags: - cmc summary: Cmc farming pools info description: Get farming pools info. responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/CmcFarmingPoolsResponse" components: schemas: CmcDexPoolInfoResponse: type: object properties: base_id: type: string base_name: type: string base_symbol: type: string base_volume: description: base_volume type: string last_price: description: last_price type: string quote_id: type: string quote_name: type: string quote_symbol: type: string quote_volume: description: quote_volume type: string required: - base_id - base_name - base_symbol - quote_id - quote_name - quote_symbol - last_price - base_volume - quote_volume CmcFarmingPoolInfoResponse: type: object properties: apr: description: apr type: string logo: type: string name: type: string pair: type: string pairLink: type: string poolRewards: type: array items: type: string totalStake: description: totalStake type: string required: - name - pair - pairLink - logo - poolRewards - apr - totalStake CmcFarmingPoolsResponse: type: object 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 required: - provider - provider_logo - provider_URL - links - pools CmcLinkResponse: type: object properties: link: type: string title: type: string required: - title - link CrossChainCurrencyInfoResponse: description: Cross chain currency response type: object properties: amount: description: amount type: string currencyAddress: type: string required: - currencyAddress - amount CrossChainKind: description: Cross chain kind type: string enum: - expectedexchange - expectedspendamount example: expectedexchange CrossChainPairInfoResponse: description: Cross chain pair response type: object properties: leftAddress: type: string pairAddress: type: string rightAddress: type: string required: - pairAddress - leftAddress - rightAddress CrossChainResponse: description: Cross chain response type: object properties: currencies: type: array items: $ref: "#/components/schemas/CrossChainCurrencyInfoResponse" pairs: type: array items: $ref: "#/components/schemas/CrossChainPairInfoResponse" required: - pairs - currencies CrossPairsRequest: description: Cross pairs request type: object properties: fromCurrencyAddress: type: string toCurrencyAddresses: type: array items: type: string required: - fromCurrencyAddress - toCurrencyAddresses CurrenciesPricesRequest: description: Currencies Prices Request type: object properties: from: description: UTC timestamp in milliseconds type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: description: UTC timestamp in milliseconds type: integer format: int64 required: - from - to - timeframe CurrenciesRequest: description: Currencies request type: object properties: currencyAddresses: nullable: true type: array items: type: string limit: type: integer format: int64 offset: type: integer format: int64 ordering: $ref: "#/components/schemas/CurrencyOrdering" whiteListUri: nullable: true type: string required: - ordering - limit - offset - currencyAddresses - whiteListUri CurrenciesResponse: description: Currencies response type: object properties: count: type: integer format: int64 currencies: type: array items: $ref: "#/components/schemas/CurrencyInfoResponse" offset: type: integer format: int64 totalCount: type: integer format: int64 required: - currencies - offset - count - totalCount CurrenciesTvlRequest: description: Currencies Tvl Request type: object properties: from: description: UTC timestamp in milliseconds type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: description: UTC timestamp in milliseconds type: integer format: int64 required: - from - to - timeframe CurrenciesUsdtPricesRequest: description: Currencies prices Request type: object properties: currency_addresses: type: array items: type: string required: - currency_addresses CurrenciesVolumeRequest: description: Currencies Volume Request type: object properties: from: description: UTC timestamp in milliseconds type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: description: UTC timestamp in milliseconds type: integer format: int64 required: - from - to - timeframe CurrencyDataResponse: description: Currency Data response type: object properties: data: description: data type: string timestamp: type: integer format: int64 required: - data - timestamp CurrencyInfoResponse: description: Pair response type: object properties: address: type: string currency: type: string fee24h: description: fee24h type: string price: description: price type: string priceChange: description: priceСhange type: string transactionsCount24h: type: integer format: int64 tvl: description: tvl type: string tvlChange: description: tvlСhange type: string volume24h: description: volume24h type: string volume7d: description: volume7d type: string volumeChange24h: description: volumeChange24h type: string required: - currency - address - price - priceChange - tvl - tvlChange - volume24h - volumeChange24h - volume7d - fee24h - transactionsCount24h CurrencyOrdering: description: Currency ordering nullable: true type: string enum: - tvlascending - tvldescending - volume24hascending - volume24hdescending - priceascending - pricedescending - pricechangeascending - pricechangedescending example: tvlascending EventType: description: Event Type type: string enum: - swaplefttoright - swaprighttoleft - deposit - withdraw example: swaplefttoright NewCrossPairsRequest: description: Cross pairs request type: object properties: amount: type: string deep: type: integer format: int32 direction: $ref: "#/components/schemas/CrossChainKind" fromCurrencyAddress: type: string minTvl: description: minTvl type: string slippage: description: slippage type: string toCurrencyAddress: type: string whiteListCurrencies: type: array items: type: string whiteListUri: nullable: true type: string required: - fromCurrencyAddress - toCurrencyAddress - whiteListUri - whiteListCurrencies - minTvl - deep - amount - direction - slippage OhlcvResponse: description: Single OHLCV response type: object properties: close: description: close type: string high: description: high type: string low: description: low type: string open: description: open type: string timestamp: description: UTC timestamp in milliseconds type: integer format: int64 volume: description: volume type: string required: - open - high - low - close - volume - timestamp PairMetaResponseV1: description: Pair response type: object properties: base: type: string baseAddress: type: string beneficiaryAddress: nullable: true type: string counter: type: string counterAddress: type: string fee: description: fee type: string feeBeneficiary: description: feeBeneficiary type: string lpAddress: type: string pairType: $ref: "#/components/schemas/PairType" poolAddress: type: string required: - base - baseAddress - counterAddress - counter - poolAddress - lpAddress - fee - pairType - feeBeneficiary - beneficiaryAddress PairOhlcvRequest: description: OHLCV request type: object properties: from: description: UTC timestamp in milliseconds type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: description: UTC timestamp in milliseconds type: integer format: int64 required: - timeframe - from - to PairOrdering: description: Pair ordering nullable: true type: string enum: - tvlascending - tvldescending - volume24hascending - volume24hdescending - volume7dascending - volume7ddescending example: tvlascending PairResponseV1: description: Pair response type: object properties: fee24h: description: fee24h type: string fee7d: description: fee7d type: string feeAllTime: description: feeAllTime type: string leftLocked: description: left_locked type: string leftPrice: description: left_price type: string lpLocked: description: lp_locked type: string meta: $ref: "#/components/schemas/PairMetaResponseV1" oneLeftToRight: description: oneLeftToRight type: string oneRightToLeft: description: oneRightToLeft type: string rightLocked: description: right_locked type: string rightPrice: description: right_price type: string tvl: description: tvl type: string tvlChange: description: tvl_change type: string volume24h: description: volume24h type: string volume7d: description: volume7d type: string volumeChange24h: description: volume_change_24h type: string required: - meta - tvl - tvlChange - leftLocked - leftPrice - rightLocked - rightPrice - volume24h - lpLocked - volumeChange24h - volume7d - fee24h - fee7d - feeAllTime - oneLeftToRight - oneRightToLeft PairTvlRequest: description: Pair Tvl request type: object properties: from: description: UTC timestamp in milliseconds type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: description: UTC timestamp in milliseconds type: integer format: int64 required: - timeframe - from - to PairType: description: Pair type type: string enum: - default - stable example: default PairVolumeRequest: description: Pair Volume request type: object properties: from: description: UTC timestamp in milliseconds type: integer format: int64 timeframe: $ref: "#/components/schemas/Timeframe" to: description: UTC timestamp in milliseconds type: integer format: int64 required: - timeframe - from - to PairsRequest: description: Pairs request type: object properties: currencyAddress: nullable: true type: string currencyAddresses: nullable: true type: array items: type: string favoritePools: nullable: true type: array items: type: string limit: type: integer format: int64 offset: type: integer format: int64 ordering: $ref: "#/components/schemas/PairOrdering" tvlAmountGe: description: tvl_amount_ge type: string tvlAmountLe: description: tvl_amount_le type: string whiteListUri: nullable: true type: string required: - favoritePools - ordering - limit - offset - currencyAddress - tvlAmountGe - tvlAmountLe - currencyAddresses - whiteListUri PairsResponseV1: description: Pair response type: object properties: count: type: integer format: int64 offset: type: integer format: int64 pairs: type: array items: $ref: "#/components/schemas/PairResponseV1" totalCount: type: integer format: int64 required: - pairs - offset - count - totalCount Timeframe: description: Timeframe type: string enum: - H1 - D1 example: H1 TransactionInfoResponseV1: description: Pair response type: object properties: eventType: $ref: "#/components/schemas/EventType" fee: description: fee type: string feeCurrency: nullable: true type: string left: type: string leftAddress: type: string leftValue: description: leftValue type: string lp: type: string lpAddress: type: string lpValue: description: lpValue type: string messageHash: type: string poolAddress: type: string right: type: string rightAddress: type: string rightValue: description: rightValue type: string secondFee: description: second_fee type: string secondFeeCurrency: nullable: true type: string timestampBlock: type: integer format: int32 transactionHash: type: string tv: description: tv type: string userAddress: type: string required: - messageHash - transactionHash - left - right - lp - tv - leftValue - rightValue - lpValue - userAddress - poolAddress - leftAddress - rightAddress - lpAddress - timestampBlock - eventType - fee - feeCurrency - secondFee - secondFeeCurrency TransactionsInfoResponseV1: description: Pair response type: object properties: count: type: integer format: int64 offset: type: integer format: int64 totalCount: type: integer format: int64 transactions: type: array items: $ref: "#/components/schemas/TransactionInfoResponseV1" required: - transactions - offset - count - totalCount TransactionsOrdering: description: Transactions ordering nullable: true type: string enum: - blocktimeascending - blocktimedescending - fromexecascending - fromexecdescending - toexecascending - toexecdescending - tvascending - tvdescending example: blocktimeascending TransactionsRequest: description: Transactions request type: object properties: createdAtGe: nullable: true type: integer format: int64 createdAtLe: nullable: true type: integer format: int64 currencyAddress: nullable: true type: string currencyAddresses: nullable: true type: array items: type: string displayTotalCount: nullable: true type: boolean eventType: nullable: true type: array items: $ref: "#/components/schemas/EventType" leftAmountGe: description: leftAmountGe type: string leftAmountLe: description: leftAmountLe type: string limit: type: integer format: int64 offset: type: integer format: int64 ordering: $ref: "#/components/schemas/TransactionsOrdering" poolAddress: nullable: true type: string rightAmountGe: description: rightAmountGe type: string rightAmountLe: description: rightAmountLe type: string timestampBlockGe: nullable: true type: integer format: int64 timestampBlockLe: nullable: true type: integer format: int64 tvGe: description: tvGe type: string tvLe: description: tvLe type: string userAddress: nullable: true type: string whiteListUri: nullable: true type: string required: - currencyAddresses - whiteListUri - ordering - limit - offset - currencyAddress - poolAddress - userAddress - createdAtGe - createdAtLe - timestampBlockGe - timestampBlockLe - leftAmountGe - leftAmountLe - rightAmountGe - rightAmountLe - tvGe - tvLe - eventType - displayTotalCount