OpenLiq Aggregator
  • Overview
    • 💡The Problem
    • ✨Our Solution
    • Introducition
  • OpenLiq Aggregator Specs
    • ⚙️Workflow
    • ⛓️Supported Chains
    • ⛓️Supported Chains for Solana
    • 📈Supported DEXs
    • 🌉Supported Bridges
    • 💸Fees
      • 📐Collect Fees
    • 📃Roadmap
    • Token economics
  • Developer
    • APIs
      • 🟪Index
      • 🟪Types
      • 🟣Get /routes
      • 🟣Get /route
      • 🟣Get /quote
      • 🟣Get /chains
      • 🟣Get /tokens
Powered by GitBook
On this page
  • Chain
  • TX
  • Path
  • Token
  • Cost
  • Route
  1. Developer
  2. APIs

Types

Chain

type Chain = {
    name: string,
    chainId: string,
    type: string,
    mainnet: number,
    multicallAddress: string,
    icon: string,
    nativeToken: {
        "symbol": string,
        "address": string,
        "coinKey": string,
        "chainId": number,
        "decimals": number,
        "name": string,
        "logoURI": string,
    }
}

TX

type TX = {
    from: string,
    //for evm
    to?: string,
    data?: string,
    value?: string,

    //for solana
    tx?: { keys: {}[], programId: string, data: any }[],
    singer?: any
 }

Path

type Path = {
    type: string,
    name: string,
    chain: string,
}

Token

type Token = {
    chainId: string,
    address: string,
    decimals: number,
    name: string,
    symbol: string,
    chainName: string,
    icon: string,
    amount: string,//wei
}

Cost

type Cost = Token & {
    title: string
}

Route

type Route = {
    key: string,
    type: string,
    from: Token,
    to: Token,
    path: Path[],
    costs: Cost[],
    amountIn: string,
    amountOut: string,
    receiver: string,
    slippage: string,
    tx?: TX,
    timeEstimated: number,
    fees:{
        route?:Token,
        protocol?:Token,
        network?:Token,
        gas?:Token & {gasPrice:string,gasLimit:string},
    }
}
PreviousIndexNextGet /routes

Last updated 10 months ago

🟪