create account

[pybitshares.com] New python library for BitShares: pybitshares - brother of pysteem by chainsquad

View this thread on: hive.blogpeakd.comecency.com
· @chainsquad · (edited)
$32.04
[pybitshares.com] New python library for BitShares: pybitshares - brother of pysteem
[![](https://bitshares.org/images/transparent_b.png)](http://pybitshares.com)

We are pleased to announce our first public release of [pybitshares](http://pybitshares.com) in version 0.1.0! This library has been built following the success of [pysteem](http://pysteem.com).

## What is BitShares

BitShares is a **blockchain-based autonomous company** (i.e. a DAC) that offers decentralized exchanging as well as sophisticated financial instruments as *products*.

It is based on *Graphene* (tm), a blockchain technology stack (i.e. software) that allows for fast transactions and ascalable blockchain solution. In case of BitShares, it comes with decentralized trading of assets as well as customized on-chain smart contracts.

## What is pybitshares

The purpose of *pybitshares* is to simplify development of products and services that use the BitShares blockchain. It comes with

* it's own (bip32-encrypted) wallet
* RPC interface for the Blockchain backend
* JSON-based blockchain objects (accounts, blocks, prices, markets, etc)
* a simple to use yet powerful API
* transaction construction and signing
* push notification API
* *and more*

## Quickstart/Demo

Transfers:

    from bitshares import BitShares
    bitshares = BitShares()
    bitshares.transfer("<to>", "<amount>", "<asset>", "[<memo>]", account="<from>")

Monitoring the Blockchain:

    from bitshares.blockchain import Blockchain
    blockchain = Blockchain()
    for op in Blockchain.ops():
        print(op)

Obtaining a Block:

    from bitshares.block import Block
    print(Block(1))

Obtaining an Account:

    from bitshares.account import Account
    account = Account("init0")
    print(account.balances)
    print(account.openorders)
    for h in account.history():
        print(h)

Dealing with the markets:

    from bitshares.market import Market
    market = Market("USD:BTS")
    print(market.ticker())
    print(market.sell(300, 100)  # sell 100 USD for 300 BTS/USD

Dealing with call positions/collateral:

    from bitshares.dex import Dex
    dex = Dex()
    dex.adjust_collateral_ratio("SILVER", 3.5)

## Uptick

Keep in mind that this library is tightly connected to [uptick](http://uptick.rocks), which is a command line tool similar to `piston`. Even though the library can be used without uptick, it still makes your live easier when it comes to dealing with your wallet. There will be a separate announcement for uptick shortly.

## Funding

This work has been proudly funded by the BitShares blockchain by means of a blockchain worker!
---

## ChainSquad Witness

If you like the services offered by [ChainSquad GmbH](http://chainsquad.com), please consider [approving our new witness](https://steemit.com/steem/@chainsquad/chainsquad-com-for-witness): `chainsquad.com`

Thanks you!
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 272 others
properties (23)
authorchainsquad
permlinkpybitshares-com-new-python-library-for-bitshares-pybitshares---brother-of-pysteem
categorychainsquad
json_metadata{"app":"steemit/0.1","tags":["chainsquad","bitshares","python","blockchain"],"image":["https://bitshares.org/images/transparent_b.png"],"links":["http://pybitshares.com","http://pysteem.com","http://uptick.rocks","http://chainsquad.com","https://steemit.com/steem/@chainsquad/chainsquad-com-for-witness"],"format":"markdown"}
created2017-02-28 11:52:15
last_update2017-02-28 12:18:12
depth0
children2
last_payout2017-03-31 18:24:57
cashout_time1969-12-31 23:59:59
total_payout_value30.254 HBD
curator_payout_value1.784 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,784
author_reputation42,383,038,531,003
root_title"[pybitshares.com] New python library for BitShares: pybitshares - brother of pysteem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id2,612,581
net_rshares71,212,939,298,445
author_curate_reward""
vote details (336)
@cm-steem ·
Excellent work @chainsquad! :)
properties (22)
authorcm-steem
permlinkre-chainsquad-pybitshares-com-new-python-library-for-bitshares-pybitshares---brother-of-pysteem-20170301t133425693z
categorychainsquad
json_metadata{"tags":["chainsquad"],"users":["chainsquad"],"app":"steemit/0.1"}
created2017-03-01 13:34:24
last_update2017-03-01 13:34:24
depth1
children0
last_payout2017-03-31 18:24:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length30
author_reputation58,522,774,254,119
root_title"[pybitshares.com] New python library for BitShares: pybitshares - brother of pysteem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,620,719
net_rshares0
@screenname ·
Re: [pybitshares.com] New python library for BitShares: pybitshares - brother of pysteem
<p>This post has been ranked within the top 25 most undervalued posts in the second half of Feb 28. We estimate that this post is undervalued by $12.15 as compared to a scenario in which every voter had an equal say.</p> 
<p>See the full rankings and details in <a href="https://steemit.com/curation/@screenname/the-daily-tribune-most-undervalued-posts-of-feb-28---part-ii">The Daily Tribune: Feb 28 - Part II</a>. You can also read about some of our methodology, data analysis and technical details in <a href="https://steemit.com/curation/@screenname/introducing-the-daily-tribune-most-undervalued-posts-of-nov-04---part-i">our initial post</a>.</p>
<p>If you are the author and would prefer not to receive these comments, simply reply "Stop" to this comment.</p>
properties (22)
authorscreenname
permlinkre-pybitshares-com-new-python-library-for-bitshares-pybitshares---brother-of-pysteem-20170301t010704
categorychainsquad
json_metadata"{"replyto": "@chainsquad/pybitshares-com-new-python-library-for-bitshares-pybitshares---brother-of-pysteem"}"
created2017-03-01 01:07:03
last_update2017-03-01 01:07:03
depth1
children0
last_payout2017-03-31 18:24:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length766
author_reputation46,276,338,038,330
root_title"[pybitshares.com] New python library for BitShares: pybitshares - brother of pysteem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,617,237
net_rshares0