LogoLogo
  • About Bancor Network
    • Bancor V3
    • Bancor Basics
      • About Bancor
      • What Can I Do With Bancor?
      • Liquidity Pools
      • Single-Side Liquidity
      • Why Use Bancor?
      • Resources
    • Resources for DAOs
      • Token Whitelisting Requirements
      • Liquidity Mining
        • Auto Compounding Rewards
          • How Auto Compounding Rewards work
          • How to Create an Auto Compounding Rewards Program
          • Custom Rewards Programs
        • Dual Liquidity Mining
        • Standard (External) Rewards
    • Security & Audits
      • Multisig Rights
      • Oracles
      • DAO MSIG Intervention Policy
  • Contracts & Functions
    • Contracts
    • Write Functions
      • Transaction Prerequisites
        • approve() / allowance()
      • Trading
        • tradeBySourceAmount()
        • tradeByTargetAmount()
        • Trading Troubleshooting
      • Adding Liquidity
        • deposit()
        • depositFor()
        • Deposit Troubleshooting
        • depositAndJoin()
      • Removing Liquidity
        • Initiating Cooldown
          • initWithdrawal()
        • withdraw()
        • cancelWithdrawal()
        • Withdraw Troubleshooting
      • Flashloan
        • flashLoan()
        • Flashloan Troubleshooting
      • Migrating Liquidity to v3
        • Migrating Bancor positions to v3
          • migratePositions()
          • migratePoolTokens()
          • Errors and Troubleshooting
        • Migrating from Uniswap v2
          • migrateUniswapV2Position()
        • Migrating from Sushiswap
          • migrateSushiSwapV1Position()
      • Rewards
        • join()
        • stakeRewards()
        • autoProcessRewards()
        • claimRewards()
        • leave()
      • Surplus migration
        • withdrawPOL()
      • Network Fees
        • burnNetworkFees()
    • Read Functions
      • Rewards
        • Standard rewards
          • Identify if a program exists
            • Auto Compounding
            • Standard Rewards
          • programIds()
          • programs()
          • providerProgramIds()
          • pendingRewards()
          • latestProgramId()
          • isProgramActive()
          • isProgramEnabled()
          • providerStake()
          • programStake()
          • providerRewards()
        • Auto compounding rewards
          • bnToken balance
          • isProgramActive()
          • isProgramPaused()
          • pools()
          • program()
          • programs()
      • Liquidity Pool Details
        • liquidityPools()
        • isPoolValid()
        • isPoolStable()
        • tradingLiquidity()
        • depositingEnabled()
        • poolFundingLimit()
      • Trades
        • tradeOutputBySourceAmount()
        • tradeInputByTargetAmount()
        • tradingEnabled()
        • tradingFeePMM()
      • Withdrawals
        • isReadyForWithdrawal()
        • withdrawalRequest()
        • withdrawalAmounts()
        • withdrawalRequestIds()
        • withdrawalRequestCount()
        • lockDuration()
      • Pool Token Information
        • poolToken()
        • collectionByPool()
        • poolTokenToUnderlying()
        • underlyingToPoolToken()
      • Vortex
        • pendingNetworkFeeAmount()
        • minNetworkFeeBurn()
      • Surplus whitelist
        • protectedTokenWhitelist()
    • Data & Events
      • General Data
        • contextId
      • Trading Data
        • event TokensTraded()
      • Liquidity Data
        • TotalLiquidityUpdated()
        • TradingLiquidityUpdated()
        • TokensDeposited()
        • TokensWithdrawn()
        • WithdrawalInitiated()
        • WithdrawalCancelled()
        • WithdrawalCompleted()
        • LockDurationUpdated()
        • Cross AMM Migration Data
          • UniswapV2PositionMigrated()
          • SushiswapV1PositionMigrated()
      • Flashloan Data
        • FlashLoanCompleted()
        • FlashLoanFeePPMUpdated()
      • Rewards
        • Staking and Unstaking
          • Event ProviderJoined()
          • Event ProviderLeft()
        • Claiming and Restaking Rewards
          • Event RewardsClaimed()
          • Event RewardsStaked()
  • Developer Guides
    • Bancor Vortex Burner
    • Bancor Etherscan Guide
      • Etherscan Basics
      • Deposit
      • Deposit and Join
      • Rewards: Joining Standard Rewards
      • Rewards: Stake & Claim
      • Rewards: Leaving the Rewards Contract
      • Withdrawing Tokens
        • Initiating the Withdrawal
        • Completing the Withdrawal
      • Migrating V2.1 Positions
      • Rewards: Auto Compounding Rewards Distribution
    • REST API
      • API Reference
      • DLT Identifier
Powered by GitBook
On this page
  • Tokens
  • Pools
  • BNT
  • Stats
  1. Developer Guides
  2. REST API

API Reference

This API endpoint returns Bancor V3 data

Tokens

Returns all available tokens in the Bancor Network, along with their metadata, liquidity, volume and pricing info. You can provide an optional filter in order to only receive data for a specific token.

Tokens

GET https://api-v3.bancor.network/tokens

Query Parameters

Name
Type
Description

dlt_type

string

blockchain type (ethereum)

dlt_id

string

token id (address)

{
  "data": [
    {
      //dltId: the contract address of the token.
      "dltId": "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C",
      //symbol: the token's ticker symbol.
      "symbol": "BNT",
      //rate: the conversion rate of the token to the specified currencies.
      "rate": {
        "usd": "0.670200"
      },
      //rate24hAgo: the conversion rate of the token to the specified currencies 24 hours ago.
      "rate24hAgo": {
        "usd": "0.697400"
      }
    },
    {
      "dltId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
      "symbol": "ETH",
      "rate": {
        "bnt": "1643.535445429788679669",
        "usd": "1106.428061",
        "eur": "1064.024847",
        "eth": "0.992695409039592362"
      },
      "rate24hAgo": {
        "bnt": "1633.061788364370359999",
        "usd": "1138.897291",
        "eur": "1098.397358",
        "eth": "1.001066876267359030"
      }
    }
  ],
  "timestamp": {
    "ethereum": {
      "block": 14973913,
      "timestamp": 1655391209
    }
  }
}

Pools

Returns all pools in the Bancor Network, along with their metadata, liquidity, volume and pricing info. You can provide an optional filter in order to only receive data for a specific pool.

BNT is treated differently and therefore has an endpoint for its activity

Pools

GET https://api-v3.bancor.network/pools

Query Parameters

Name
Type
Description

dlt_type

string

blockchain type (ethereum)

dlt_id

String

pool id (pool token address)

{
"data": [
    {
      //poolDltId: the contract address of the token.
      "poolDltId": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
      //poolTokenDltId: the contract address of the pool token. 
      "poolTokenDltId": "0x256Ed1d83E3e4EfDda977389A5389C3433137DDA",
      //name: the token's ticker symbol.
      "name": "ETH",
      //decimals: the number of digits that appear after the decimal place for this token. 
      "decimals": 18,
      //tradingLiquidityBNT: the amount of trading liquidity for the BNT side of the token pool.
      "tradingLiquidityBNT": {
        "bnt": "50364674.618270763803425106",
        "usd": "34177468.195958",
        "eur": "32968716.005120",
        "eth": "30319.534120198999809661",
        "tkn": "50364674.618270763803425106"
      },
      //tradingLiquidityTKN: the amount of trading liquidity for the token side of the token pool.
      "tradingLiquidityTKN": {
        "bnt": "50364674.618270763803397882",
        "usd": "34177468.195958",
        "eur": "32968716.005120",
        "eth": "30319.534120198999809645",
        "tkn": "30470.210920895924232363"
      },
      //volume24h: the amount of trading volume for the pool over the last 24 hours.
      "volume24h": {
        "bnt": "6697132.603968705935417815",
        "usd": "4707651.682110",
        "eur": "4531525.730334",
        "eth": "4084.200166855439616829",
        "tkn": "4069.298981461582805471"
      },
      //fees24h: the amount of fees generated by the pool over the last 24 hours.
      "fees24h": {
        "bnt": "7098.966617575174231768",
        "usd": "4995.460920",
        "eur": "4806.765517",
        "eth": "4.318557290518016270",
        "tkn": "4.296519483416653394"
      },
      //stakedBalance: the total value of token deposits + accumulated fees on the pool. 
      "stakedBalance": {
        "bnt": "75444753.338438352307417051",
        "usd": "51196809.615464",
        "eur": "49386135.535341",
        "eth": "45417.741509739888089065",
        "tkn": "45643.450782132975649811"
      },
      //standardRewardsClaimed24h: the number of rewards claimed over the last 24 hours from a standard rewards program. 
      "standardRewardsClaimed24h": {
        "bnt": "713.573810490415064196",
        "usd": "472.284633",
        "eur": "452.110075",
        "eth": "0.438670520810619441",
        "tkn": "713.573810490415064196"
      },
      //standardRewardsProviderJoined: the number of tokens that have entered a standard rewards program. 
      "standardRewardsProviderJoined": {
        "bnt": "52097367.444393047512504145",
        "usd": "73611697.98926271385538812794",
        "eur": "70313156.06611354800045056042",
        "eth": "36314.954019748050458243",
        "tkn": "36383.398176794963073952"
      },
      //standardRewardsProviderLeft: the number of tokens that have exited a standard rewards program. 
      "standardRewardsProviderLeft": {
        "bnt": "30413159.048612060845633652",
        "usd": "33137725.07622254029455784370",
        "eur": "31545220.31943307582246998239",
        "eth": "21404.943776661780639946",
        "tkn": "21438.897116947997560467"
      },
      //standardRewardsStaked: the number of tokens currently participating in a standard rewards program. 
      "standardRewardsStaked": {
        "bnt": "21691603.163874114699474088",
        "usd": "39402414.45469151800174137550",
        "eur": "37792717.39604533052343707738",
        "eth": "14882.268629204870397228",
        "tkn": "14914.740706020326925167"
      },
      //liquidity: the current balance of tokens in the pool - inside and outside the curve.
      "liquidity": {
        "bnt": "50364674.618270763803397882",
        "usd": "34177468.195958",
        "eur": "32968716.005120",
        "eth": "30319.534120198999809645",
        "tkn": "30470.210920895924232363"
      },
      //volume24hTarget: the trading volume for the pool from the last 24 hours in which the given token was bought. 
      "volume24hTarget": {
        "bnt": "3534121.921333175267591964",
        "usd": "2486886.498395",
        "eur": "2392956.727847",
        "eth": "2149.901467479145759544",
        "tkn": "2143.963222224910063237"
      },
      //volume7d: the total trading volume for the pool over the last 7 days.
      "volume7d": {
        "bnt": "48718604.845867275560857000",
        "usd": "42033181.109681",
        "eur": "40188731.785432",
        "eth": "33513.591494627174941286",
        "tkn": "33035.241371079415229818"
      },
      //volume7dTarget: the trading volume for the pool over the last 7 days in which the token was bought. 
      "volume7dTarget": {
        "bnt": "26078005.676041025955021131",
        "usd": "22244003.941712",
        "eur": "21275761.388474",
        "eth": "17897.845183431674035879",
        "tkn": "17593.297964382346631740"
      },
      //fees7d: the amount of fees earned for the given pool over the last 7 days.
      "fees7d": {
        "bnt": "52654.044115104551086800",
        "usd": "44886.770944",
        "eur": "42933.655838",
        "eth": "36.136795762094048099",
        "tkn": "35.257110149062818679"
      },
      //networkFees24h: the amount of fees earned by the network for a given pool over the last 24 hours, used to buy BNT and sent to the Vortex
      "networkFees24h":{
        "bnt":"1786.363669100794773992",
        "usd":"1064.488524",
        "eur":"1037.796732",
        "eth":"0.607006151002393919"
      },
      //networkFees24hAgo: the amount of fees earned by the network for a given pool over the previous 24 hours, used to buy BNT and sent to the Vortex
       "networkFees24hAgo":{
          "bnt":"1225.233230725066395358",
          "usd":"743.156979",
          "eur":"728.459263",
          "eth":"0.424786104574933942"
      },
      //networkFees7d: the amount of fees earned by the network for a given pool over the previous 7 days, used to buy BNT and sent to the Vortex
       "networkFees7d":{
          "bnt":"7767.794840909822498910",
          "usd":"4654.437981",
          "eur":"4558.369438",
          "eth":"2.673654426117068686"
      },
      //tradingFeePPM: the percentage fee taken for trades for the pool. For example, the number 2000 is equal to 0.2%. 
      "tradingFeePPM": "2000",
      //tradingEnabled: indicates if trading is currently enabled for the given pool. True means yes, and false means no. 
      "tradingEnabled": true
    }
  ],
  "timestamp": {
    "ethereum": {
      "block": 14973389,
      "timestamp": 1655383615
    }
  }

BNT

Returns all relevant values for BNT pool and activity.

BNT

GET https://api-v3.bancor.network/bnt

{
  "data": {
    //poolDltId: the contract address of the token.
    "poolDltId": "0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C",
    //decimals: the number of digits that appear after the decimal place for this token. 
    "decimals": 18,
    //poolTokenDltId: the contract address of the BNT pool token.
    "poolTokenDltId": "0xAB05Cf7C6c3a288cd36326e4f7b8600e7268E344",
    //name: the token's ticker symbol.
    "name": "BNT",
    //stakedBalance: the total value of token deposits + accumulated fees on the pool.
    "stakedBalance": {
      "bnt": "45131535.221744107666713602",
      "usd": "22249846.86431984507968980578",
      "eur": "21834636.74027979928915604064",
      "eth": "18734.100270545979092452"
    },
    //fees24h: the amount of fees generated by the pool over the last 24 hours.
    "fees24h": {
      "bnt": "6477.992716663227040885",
      "usd": "3230.06781943169677559646",
      "eur": "3175.73797667488660977824",
      "eth": "2.659658461675946231"
    },
    //volume24h: the amount of trading volume for the BNT pool over the last 24 hours.
    "volume24h": {
      "bnt": "511379.641054659309406505",
      "usd": "253434.31710381275858595857",
      "eur": "249205.14783198829664264128",
      "eth": "209.829698574503004465"
    },
    //tradingLiquidity: the amount of BNT trading liquidity.
    "tradingLiquidity": {
      "bnt": "85082428.453514718289163528",
      "usd": "41849714.04118937843328603700",
      "eur": "41111178.88145357756190448004",
      "eth": "35216.627741053177580087"
    },
    //standardRewardsClaimed24h: the number of rewards claimed over the last 24 hours from a standard rewards program.
    "standardRewardsClaimed24h": {
      "bnt": "1.931779788492904493",
      "usd": "0.95506035920274753004",
      "eur": "0.93866675927961404399",
      "eth": "0.000788412388242066"
    },
    //standardRewardsStaked: the number of BNT tokens currently participating in a standard rewards program.
    "standardRewardsStaked": {
      "bnt": "13583450.131978389774139460",
      "usd": "36260954.29020203442263839527",
      "eur": "34791960.55690934176323393968",
      "eth": "11964.248317704888251593"
    },
    //bntRate: the conversion rate of BNT to USD. 
    "bntRate": "0.49210000000000000000",
    //bntRate24hAgo: the conversion rate of BNT to USD 24 hours ago.
    "bntRate24hAgo": "0.49980000000000000000",
    //liquidity: the total number of BNT currently circulating on the network.
    "liquidity": {
      "bnt": "85254370.432855636063908971",
      "usd": "42030404.62339782857950712270",
      "eur": "41246064.41541555672771916016",
      "eth": "35389.089166678374530128"
    },
    //fees7d: the total fees earned by the BNT pool over the last 7 days.
    "fees7d": {
      "bnt": "35428.883218678897051256",
      "usd": "17551.37474692988776888557",
      "eur": "17117.60358517991659591216",
      "eth": "15.059108479590813756"
    },
    //volume7d the total trading volume in the BNT pool over the last 7 days.
    "volume7d": {
      "bnt": "5610656.101146331432213081",
      "usd": "2767596.64449643722704674287",
      "eur": "2698785.10210410748926462695",
      "eth": "2401.490143526771218113"
    },
    //networkFees24h: the amount of fees earned by the network for a given pool over the last 24 hours, used to buy BNT and sent to the Vortex
    "networkFees24h":{
       "bnt":"1786.363669100794773992",
       "usd":"1064.488524",
       "eur":"1037.796732",
       "eth":"0.607006151002393919"
    },
    //networkFees24hAgo: the amount of fees earned by the network for a given pool over the previous 24 hours, used to buy BNT and sent to the Vortex
     "networkFees24hAgo":{
       "bnt":"1225.233230725066395358",
       "usd":"743.156979",
       "eur":"728.459263",
       "eth":"0.424786104574933942"
      },
    //networkFees7d: the amount of fees earned by the network for a given pool over the previous 7 days, used to buy BNT and sent to the Vortex
     "networkFees7d":{
       "bnt":"7767.794840909822498910",
       "usd":"4654.437981",
       "eur":"4558.369438",
       "eth":"2.673654426117068686"
      }
  },
  "timestamp": {
    "ethereum": {
      "block": 15030879,
      "timestamp": 1656277285
    }
  }
}

Stats

Returns global stats of the Bancor Network.

Stats

GET https://api-v3.bancor.network/stats

{
"data": {
  //tradingLiquidityBNT: the amount of trading liquidity for the BNT side of the token pool.
  "tradingLiquidityBNT": {
    "bnt": "110250287.767982727465906585",
    "usd": "74453187.214831",
    "eur": "71637398.293181",
    "eth": "66854.829123342502556334"
  },
  //tradingLiquidityTKN: the amount of trading liquidity for the token side of the token pool.
  "tradingLiquidityTKN": {
    "bnt": "110250287.767963440685519876",
    "usd": "74453187.214810",
    "eur": "71637398.293160",
    "eth": "66854.829123330874554511"
  },
  //tradingLiquidityBNT24hAgo: the amount of trading liquidity for the BNT side of the token pool 24 hours ago.
  "tradingLiquidityBNT24hAgo": {
    "bnt": "109023476.551250465157354853",
    "usd": "75364153.484680",
    "eur": "72547714.851086",
    "eth": "67839.525679538637215070"
  },
  //tradingLiquidityTKN24hAgo: the amount of trading liquidity for the token side of the token pool 24 hours ago.
  "tradingLiquidityTKN24hAgo": {
    "bnt": "109023476.551231277139086931",
    "usd": "75364153.484667",
    "eur": "72547714.851073",
    "eth": "67839.525679526874957835"
  },
  //totalVolume24h: the total trading volume on the network over the last 24 hours. 
  "totalVolume24h": {
    "bnt": "9506069.926301235115273883",
    "usd": "6684740.459691",
    "eur": "6436646.813308",
    "eth": "5797.997165209436672080"
  },
  //totalFees24h: the total fees generated in the network over the last 24 hours. 
  "totalFees24h": {
    "bnt": "35190.460368079897192528",
    "usd": "24694.896577",
    "eur": "23778.890782",
    "eth": "21.463319193830551121"
  },
  //totalVolume24hAgo: the total trading volume on the network from the previous day, from 48 to 24 hours ago. 
  "totalVolume24hAgo": {
    "bnt": "21988505.880567848941318587",
    "usd": "16469502.861746",
    "eur": "15781307.227716",
    "eth": "14604.966766735022202845"
  },
  //totalFees24hAgo: the total fees generated in the network during the previous day, from 48 to 24 hours ago. 
  "totalFees24hAgo": {
    "bnt": "75574.185920781097833484",
    "usd": "56775.619076",
    "eur": "54424.861393",
    "eth": "50.259830504957149538"
  },
  //stakedBalanceBNT: the total value of BNT deposits + accumulated fees on the pool. 
  "stakedBalanceBNT": {
    "bnt": "87212191.586482189370408636",
    "usd": "59278126.621331",
    "eur": "57132706.708304",
    "eth": "53583.170510734657149179"
  },
  //stakedBalanceTKN: the total value of token deposits + accumulated fees on the pool. 
  "stakedBalanceTKN": {
    "bnt": "200470507.784949976693200991",
    "usd": "136345661.756302",
    "eur": "131203518.659150",
    "eth": "122596.629307722815554734"
  },
  //totalStandardRewardsClaimed24h: the total value claimed from a standards rewards program over the last 24 hours. 
  "totalStandardRewardsClaimed24h": {
    "bnt": "1393.870286804186366456",
    "usd": "939.972413",
    "eur": "901.066932",
    "eth": "0.852673732395930385"
  },
  //liquidityTKN: the total value of Tokens currently circulating on the network. 
  "liquidityTKN": {
    "bnt": "141915215.962996934598659213",
    "usd": "96764680.171711",
    "eur": "93111637.859861",
    "eth": "86889.228326325117974448"
  },
  //liquidityBNT: the total value of BNT currently circulating on the network. 
  "liquidityBNT": {
    "bnt": "110308397.212727000599708615",
    "usd": "74976617.585490",
    "eur": "72263031.014057",
    "eth": "67773.479247499469168460"
  },
  //totalVolume7d: the total trading volume over the last 7 days. 
  "totalVolume7d": {
    "bnt": "72719288.210983006949787348",
    "usd": "63743771.117345",
    "eur": "60934631.574452",
    "eth": "50195.865295863179928286"
  },
  //totalFees7d: the total amount of fees generated over the last 7 days. 
  "totalFees7d": {
    "bnt": "267714.430720918734362902",
    "usd": "237180.202084",
    "eur": "226712.785781",
    "eth": "185.268809335202363272"
  },
  //networkFees24h: the amount of fees generated by the network over the last 24 hours, used to buy BNT and sent to the Vortex
  "networkFees24h":{
    "bnt":"1786.363669100794773992",
    "usd":"1064.488524",
    "eur":"1037.796732",
    "eth":"0.607006151002393919"
  },
  //networkFees24hAgo: the amount of fees generated by the network over the previous 24 hours, used to buy BNT and sent to the Vortex
  "networkFees24hAgo":{
    "bnt":"1225.233230725066395358",
    "usd":"743.156979",
    "eur":"728.459263",
    "eth":"0.424786104574933942"
  },
  //networkFees7d: the amount of fees generated by the network over the previous 7 days, used to buy BNT and sent to the Vortex
  "networkFees7d":{
    "bnt":"7767.794840909822498910",
    "usd":"4654.437981",
    "eur":"4558.369438",
    "eth":"2.673654426117068686"
  },  
  //bntRate: the price of BNT.
  "bntRate": "0.671800",
  //bntRate24hAgo: the price of BNT 24 hours ago. 
  "bntRate24hAgo": "0.687300",
  //totalLiquidity: the sum of deposits for the network.
  "totalLiquidity": {
    "bnt": "252223613.175723935198367828",
    "usd": "171741297.757201",
    "eur": "165374668.873918",
    "eth": "154662.707573824587142908"
  },
  //totalTradingLiquidity: the sum of deposits for the network currently available for trades. 
  "totalTradingLiquidity": {
    "bnt": "220500575.535946168151426461",
    "usd": "148906374.429641",
    "eur": "143274796.586341",
    "eth": "133709.658246673377110845"
  },
  //totalTradingLiquidity24hAgo: the sum of deposits for the network currently available for trades 24 hours ago.
  "totalTradingLiquidity24hAgo": {
    "bnt": "218046953.102481742296441784",
    "usd": "150728306.969347",
    "eur": "145095429.702159",
    "eth": "135679.051359065512172905"
  }
},
  "timestamp": {
    "ethereum":{
      "block":14973913,
      "timestamp":1655391209
    }
  }
}

PreviousREST APINextDLT Identifier

Last updated 2 years ago