API

From DeFiChain-Wiki
Revision as of 12:25, 22 December 2020 by BerndMack (talk | contribs)

General

Blockchain

Addresses

http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD
http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD/balance
http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD/txs
http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD?limit=20
http://mainnet-api.defichain.io/api/DFI/mainnet/address/stats/rich-list?pageno=1&pagesize=200

Transactions

http://mainnet-api.defichain.io/api/DFI/mainnet/tx/923bfa3e400d841baa88a566bf3a348a181f1d16881fb36dd46cb8561db5dc92
http://mainnet-api.defichain.io/api/DFI/mainnet/tx/923bfa3e400d841baa88a566bf3a348a181f1d16881fb36dd46cb8561db5dc92/coins

Blocks

https://api.defichain.io/v1/getBlockActivity?network=mainnet
http://mainnet-api.defichain.io/api/DFI/mainnet/block/12345
http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=100&anchorsOnly=true
http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=100&anchorsOnly=false
http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=500000&anchorsOnly=false <--response 200MB!

DEX (Decentraliced Exchange)

https://api.defichain.io/v1/getdfisupply
https://api.defichain.io/v1/listpoolpairs
https://api.defichain.io/v1/listtokens
https://api.defichain.io/v1/getpoolpair?id=4&network=mainnet

  • ETH-DFI: id=4
  • BTC-DFI: id=5
  • USDT-DFI: id=6