Difference between revisions of "API"

From DeFiChain-Wiki
m (USDC id's added)
 
(19 intermediate revisions by 7 users not shown)
Line 5: Line 5:
  
 
== Blockchain ==
 
== Blockchain ==
 +
https://api.defichain.io/v1/getanchorlist?network=mainnet
 +
 
=== Addresses ===
 
=== Addresses ===
http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD/balance<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD/balance<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD/txs<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD/txs<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD?limit=20<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/address/8RUNjYgCHkT56t4C38YaaDvUQcY4HozdcD?limit=20<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/address/stats/rich-list?pageno=1&pagesize=200<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/address/stats/rich-list?pageno=1&pagesize=200
 +
* https://www.blockchain.com/btc/address/1FtZwEZKknoquUb6DyQHFZ6g6oomXJYEcb  address held by all DeFi nodes<br>
 
=== Transactions ===
 
=== Transactions ===
http://mainnet-api.defichain.io/api/DFI/mainnet/tx/923bfa3e400d841baa88a566bf3a348a181f1d16881fb36dd46cb8561db5dc92<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/tx/923bfa3e400d841baa88a566bf3a348a181f1d16881fb36dd46cb8561db5dc92<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/tx/923bfa3e400d841baa88a566bf3a348a181f1d16881fb36dd46cb8561db5dc92/coins<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/tx/923bfa3e400d841baa88a566bf3a348a181f1d16881fb36dd46cb8561db5dc92/coins<br>
 
=== Blocks ===
 
=== Blocks ===
https://api.defichain.io/v1/getBlockActivity?network=mainnet<br>
+
* https://api.defichain.io/v1/getBlockActivity?network=mainnet<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/block/12345<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/block/12345<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=100&anchorsOnly=true<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=100&anchorsOnly=true<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=100&anchorsOnly=false<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=100&anchorsOnly=false<br>
http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=500000&anchorsOnly=false <--response 200MB!<br>
+
* http://mainnet-api.defichain.io/api/DFI/mainnet/block?limit=500000&anchorsOnly=false <--response 200MB!<br>
  
 
== DEX (Decentraliced Exchange) ==
 
== DEX (Decentraliced Exchange) ==
https://api.defichain.io/v1/getdfisupply<br>
+
=== General ===
https://api.defichain.io/v1/listpoolpairs<br>
+
* https://api.defichain.io/v1/listyieldfarming<br>
https://api.defichain.io/v1/listtokens<br>
+
* https://api.defichain.io/v1/listswaps<br>
https://api.defichain.io/v1/getpoolpair?id=4&network=mainnet<br>
+
* https://api.defichain.io/v1/getsubgraphswaps<br>
 +
* https://api.defichain.io/v1/getdfisupply<br>
 +
* https://api.defichain.io/v1/listpoolpairs<br>
 +
* https://api.defichain.io/v1/listtokens<br>
 +
* https://api.defichain.io/v1/getaccount?including_start=true&owner=dDgnpwmZJ2XnDXRVuqrBbbfoL5x953fP3b  (the option including_start=true is needed to show the DFI-tokens)<br>
 +
* https://api.defichain.io/v1/gettokenrichlist?id=2&network=mainnet<br>
 +
* https://api.defichain.io/v1/getpoolpair?id=4&network=mainnet<br>
 +
=== Important IDs ===
 +
* DFI: id=0
 +
* ETH: id=1
 +
* BTC: id=2
 +
* USDT: id=3
 
* ETH-DFI: id=4
 
* ETH-DFI: id=4
 
* BTC-DFI: id=5
 
* BTC-DFI: id=5
 
* USDT-DFI: id=6
 
* USDT-DFI: id=6
 +
* DOGE:  id=7
 +
* DOGE-DFI: id=8
 +
* LTC: id=9
 +
* LTC-DFI: id=10
 +
* BCH: id=11
 +
* BCH-DFI: id = 12
 +
* USDC: id=13
 +
* USDC-DFI: id=14

Latest revision as of 19:35, 9 August 2021

General

Blockchain

https://api.defichain.io/v1/getanchorlist?network=mainnet

Addresses

Transactions

Blocks

DEX (Decentraliced Exchange)

General

Important IDs

  • DFI: id=0
  • ETH: id=1
  • BTC: id=2
  • USDT: id=3
  • ETH-DFI: id=4
  • BTC-DFI: id=5
  • USDT-DFI: id=6
  • DOGE: id=7
  • DOGE-DFI: id=8
  • LTC: id=9
  • LTC-DFI: id=10
  • BCH: id=11
  • BCH-DFI: id = 12
  • USDC: id=13
  • USDC-DFI: id=14