Skip to content

Commit

Permalink
Merge pull request #13 from moonorblue/update_README
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
sammchardy committed Apr 29, 2021
2 parents c62d6e1 + e0c93d9 commit b2bfb34
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,16 @@ If using the production server there is no need to pass the environment variable
# get open orders
open_orders = client.get_open_orders('tbnb185tqzq3j6y7yep85lncaz9qeectjxqe5054cgn')
# get open orders
# get ticker
ticker = client.get_ticker('NNB-0AD_BNB')
# get open orders
# get trades
trades = client.get_trades(limit=2)
# get open orders
# get order
order = client.get_order('9D0537108883C68B8F43811B780327CE97D8E01D-2')
# get open orders
# get trades
trades = client.get_trades()
# get transactions
Expand All @@ -161,6 +161,7 @@ All methods are otherwise the same as the HttpApiClient
from binance_chain.http import AsyncHttpApiClient
from binance_chain.environment import BinanceEnvironment
import asyncio
loop = None
Expand Down Expand Up @@ -291,6 +292,8 @@ General case
from binance_chain.http import HttpApiClient
from binance_chain.messages import NewOrderMsg
from binance_chain.wallet import Wallet
from binance_chain.constants import TimeInForce, OrderSide, OrderType
from decimal import Decimal
wallet = Wallet('private_key_string')
client = HttpApiClient()
Expand All @@ -299,7 +302,7 @@ General case
new_order_msg = NewOrderMsg(
wallet=wallet,
symbol="ANN-457_BNB",
time_in_force=TimeInForce.GTE,
time_in_force=TimeInForce.GOOD_TILL_EXPIRE,
order_type=OrderType.LIMIT,
side=OrderSide.BUY,
price=Decimal(0.000396000),
Expand Down Expand Up @@ -362,6 +365,7 @@ General case
from binance_chain.http import HttpApiClient
from binance_chain.messages import FreezeMsg
from binance_chain.wallet import Wallet
from decimal import Decimal
wallet = Wallet('private_key_string')
client = HttpApiClient()
Expand All @@ -383,6 +387,7 @@ General case
from binance_chain.http import HttpApiClient
from binance_chain.messages import UnFreezeMsg
from binance_chain.wallet import Wallet
from decimal import Decimal
wallet = Wallet('private_key_string')
client = HttpApiClient()
Expand Down Expand Up @@ -598,6 +603,7 @@ All methods are the same as the binance_chain.node_rpc.http.HttpRpcClient.
from binance_chain.node_rpc.http import AsyncHttpRpcClient
from binance_chain.http import AsyncHttpApiClient, PeerType
from binance_chain.environment import BinanceEnvironment
import asyncio
loop = None
Expand Down Expand Up @@ -857,6 +863,7 @@ to create our own signing service.
from binance_chain.messages import NewOrderMsg
from binance_chain.signing.http import HttpApiSigningClient
from binance_chain.constants import TimeInForce, OrderSide, OrderType
signing_client = HttpApiSigningClient('http://localhost:8000', username='sam', password='mypass')
Expand Down Expand Up @@ -901,6 +908,7 @@ To sign and broadcast an order use the `broadcast_order` method. This returns th
from binance_chain.messages import NewOrderMsg
from binance_chain.signing.http import HttpApiSigningClient
from binance_chain.constants import TimeInForce, OrderSide, OrderType
signing_client = HttpApiSigningClient('http://localhost:8000', username='sam', password='mypass')
Expand All @@ -927,6 +935,8 @@ Like all other libraries there is an async version.
from binance_chain.signing.http import AsyncHttpApiSigningClient
from binance_chain.http import AsyncHttpApiClient, PeerType
from binance_chain.environment import BinanceEnvironment
from binance_chain.constants import TimeInForce, OrderSide, OrderType
import asyncio
loop = None
Expand Down

0 comments on commit b2bfb34

Please sign in to comment.