All Projects → pcko1 → bscscan-python

pcko1 / bscscan-python

Licence: MIT license
The most popular asynchronous Python API for BscScan (Binance Smart Chain Explorer), available via PyPI.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to bscscan-python

uniswap-arbitrage-flash-swap
Uniswap flash swap arbitrage solidity contracts
Stars: ✭ 341 (+31.15%)
Mutual labels:  bsc, binance, binance-smart-chain
farm-army-backend
Track your farming and pool performance on the Binance Smart Chain, Polygon, Fantom, KuCoin Community Chain, Harmony, Celo - https://farm.army - nodejs backend
Stars: ✭ 86 (-66.92%)
Mutual labels:  bsc, binance, binance-smart-chain
PancakeSwapPredictionBot
PancakeSwap V2 Prediction Bot With Machine Learning | Automated Strategy, Auto Betting, Auto Claim
Stars: ✭ 21 (-91.92%)
Mutual labels:  bsc, binance
PancakeSwapBot
PancakeSwap prediction bot
Stars: ✭ 38 (-85.38%)
Mutual labels:  bsc, binance
bsc-archive-snapshot
Free public Binance Smart Chain (BSC) Archive Snapshot
Stars: ✭ 71 (-72.69%)
Mutual labels:  bsc, binance-smart-chain
ethereum-kit-ios
Comprehensive EVM SDK (ex: Ethereum, Binance Smart Chain) for iOS, implemented on Swift. Create wallets, watch wallets (read-only), sync transactions, filter transactions by type (erc20, bep20, swap transactions etc.), swap using native DEX protocols, easily extendable to work with custom smart contracts, and full support for EIP1159.
Stars: ✭ 148 (-43.08%)
Mutual labels:  bsc, binance-smart-chain
awesome-defi
Curated list of awesome DeFi protocols, dapps, wallets and other resources
Stars: ✭ 36 (-86.15%)
Mutual labels:  bsc, binance
Acria-Contracts
Contracts for the ETH/BSC branch of the Acria Network
Stars: ✭ 31 (-88.08%)
Mutual labels:  binance, binance-smart-chain
PancakeTokenSniper
BSC BNB Pancake token sniper, buy, take profit and rug check
Stars: ✭ 184 (-29.23%)
Mutual labels:  bsc, binance
botdexdamar
🤖 multichain trading bot with sniper, frontrun, backrun, sandwich
Stars: ✭ 124 (-52.31%)
Mutual labels:  bsc, binance
FWI
RTM
Stars: ✭ 30 (-88.46%)
Mutual labels:  bsc
hands-on-elixir-and-otp-cryptocurrency-trading-bot-source-code
Resources related to the "Hands-on Elixir & OTP: Cryptocurrency trading bot" book
Stars: ✭ 70 (-73.08%)
Mutual labels:  binance
CryptoLogos
Hundreds of crypto logos simply named by their normalized contract address
Stars: ✭ 14 (-94.62%)
Mutual labels:  bsc
hillfog
hillfog is an KPI, OKR (Objectives and Key Results), PDCA, BSC (balanced scorecard) web platform.
Stars: ✭ 18 (-93.08%)
Mutual labels:  bsc
Bogged-Token-List
Multichain token lists by Bogged Finance
Stars: ✭ 106 (-59.23%)
Mutual labels:  bsc
Pancakeswap Sniper
Barret 50 Cal. is a Pancakeswap sniping (front-runner) bot. It can be used to snipe in new coin listings, and obtain the best prices; or to place limit-buy and limit-sell orders.
Stars: ✭ 64 (-75.38%)
Mutual labels:  bsc
amm-arbitrageur
An arbitrage bot between Uniswap AMMs
Stars: ✭ 1,102 (+323.85%)
Mutual labels:  bsc
awesome-list-rpc-nodes-providers
A curated list of awesome Node providers and public PRC endpoints for Ethereum, BSC, xDAI, Fantom, Avalanche and more :)
Stars: ✭ 39 (-85%)
Mutual labels:  bsc
bsc-genesis-contract
The genesis contracts of BNB Smart Chain.
Stars: ✭ 321 (+23.46%)
Mutual labels:  bsc
theta-infrastructure-ledger-explorer
Explorer for the Theta Ledger
Stars: ✭ 57 (-78.08%)
Mutual labels:  blockchain-explorer

bscscan-python

A complete Python API for BscScan.com

Powered by BscScan.com APIs

Available on PyPI

📖 Read the official documentation here 📖

👇

A fork of the etherscan-python package.

Endpoints

The following endpoints are provided:

Accounts (source)

  • get_bnb_balance
  • get_bnb_balance_multiple
  • get_normal_txs_by_address
  • get_normal_txs_by_address_paginated
  • get_internal_txs_by_address
  • get_internal_txs_by_address_paginated
  • get_internal_txs_by_txhash
  • get_internal_txs_by_block_range_paginated
  • get_bep20_token_transfer_events_by_address
  • get_bep20_token_transfer_events_by_contract_address_paginated
  • get_bep20_token_transfer_events_by_address_and_contract_paginated
  • get_bep721_token_transfer_events_by_address
  • get_bep721_token_transfer_events_by_contract_address_paginated
  • get_bep721_token_transfer_events_by_address_and_contract_paginated
  • get_validated_blocks_by_address
  • get_validated_blocks_by_address_paginated
Contracts (source)

  • get_contract_abi
  • get_contract_source_code
Transactions (source)

  • get_tx_receipt_status
Blocks (source)

  • get_block_reward_by_block_number
  • get_est_block_countdown_time_by_block_number
  • get_block_number_by_timestamp
GETH/Parity Proxy (source)

  • get_proxy_block_number
  • get_proxy_block_by_number
  • get_proxy_block_transaction_count_by_number
  • get_proxy_transaction_by_hash
  • get_proxy_transaction_by_block_number_and_index
  • get_proxy_transaction_count
  • get_proxy_transaction_receipt
  • get_proxy_call
  • get_proxy_code_at
  • get_proxy_storage_position_at
  • get_proxy_gas_price
  • get_proxy_est_gas
Tokens (source)

  • get_total_supply_by_contract_address
  • get_circulating_supply_by_contract_address
  • get_acc_balance_by_token_contract_address
Stats (source)

  • get_total_bnb_supply
  • get_validators_list
Logs (source)

  • get_logs

If you think that a newly-added method is missing, kindly open an issue as a feature request and I will do my best to add it.

Installation

Before proceeding, you should register an account on BscScan.com and generate a personal API key to use.

Install from source:

pip install git+https://github.com/pcko1/bscscan-python.git@stable

Alternatively, install from PyPI:

pip install bscscan-python

Unit tests

In bash, test that everything looks OK on your end using your YOUR_API_KEY (without quotation marks):

bash run_tests.sh YOUR_API_KEY

Note: This will install the coverage package in your activated python environment.

Usage

In python, create a client with your personal BscScan.com API key:

import asyncio
from bscscan import BscScan

YOUR_API_KEY = "..."

async def main():
  async with BscScan(YOUR_API_KEY) as bsc:
    print(await bsc.get_bnb_balance(address="0x0000000000000000000000000000000000001004"))

if __name__ == "__main__":
  asyncio.run(main())

> '167195709084498025431541166'

Examples

Detailed examples (arguments and results) for all methods may be found in the official documentation. Documentation Status

Issues

For problems regarding installing or using the package please open an issue. Kindly avoid disclosing potentially sensitive information such as your API keys or your wallet addresses.

Cite

Kotsias, P. C., pcko1/bscscan-python: v1.0.0. https://github.com/pcko1/bscscan-python (2021). doi:10.5281/zenodo.4781726

or in bibtex:

@misc{Kotsias2020,
  author = {Kotsias, P.C.},
  title = {pcko1/bscscan-python},
  year = {2021},
  publisher = {Zenodo},
  url = {https://github.com/pcko1/bscscan-python},
  doi = {10.5281/zenodo.4781726}
}

Feel free to leave a if you found this package useful.


Powered by Bscscan.com APIs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].