Skip to content

Commit 44bdc98

Browse files
authored
Merge pull request #202 from s4w3d0ff/dev
Example updates, and fix cancelAllOrders
2 parents b219925 + ee18845 commit 44bdc98

File tree

8 files changed

+191
-658
lines changed

8 files changed

+191
-658
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![python](https://img.shields.io/badge/python-2.7%20%26%203-blue.svg)![licence](https://img.shields.io/badge/licence-GPL%20v2-blue.svg)](https://github.com/s4w3d0ff/python-poloniex/blob/master/LICENSE) [![release](https://img.shields.io/github/release/s4w3d0ff/python-poloniex.svg)![release build](https://travis-ci.org/s4w3d0ff/python-poloniex.svg?branch=v0.5.6)](https://github.com/s4w3d0ff/python-poloniex/releases)
22
[![master](https://img.shields.io/badge/branch-master-blue.svg)![master build](https://api.travis-ci.org/s4w3d0ff/python-poloniex.svg?branch=master)](https://github.com/s4w3d0ff/python-poloniex/tree/master) [![dev](https://img.shields.io/badge/branch-dev-blue.svg)![dev build](https://api.travis-ci.org/s4w3d0ff/python-poloniex.svg?branch=dev)](https://github.com/s4w3d0ff/python-poloniex/tree/dev)
3+
34
Inspired by [this](http://pastebin.com/8fBVpjaj) wrapper written by 'oipminer'
45
> I (s4w3d0ff) am not affiliated with, nor paid by [Poloniex](https://poloniex.com). If you wish to contribute to the repository please read [CONTRIBUTING.md](https://github.com/s4w3d0ff/python-poloniex/blob/master/CONTRIBUTING.md). All and any help is appreciated.
56
#### Features:
@@ -24,8 +25,10 @@ All api calls are done through an instance of `poloniex.Poloniex`. You can use t
2425
```python
2526
# import this package
2627
from poloniex import Poloniex
28+
2729
# make an instance of poloniex.Poloniex
2830
polo = Poloniex()
31+
2932
# show the ticker
3033
print(polo('returnTicker'))
3134
```
@@ -46,13 +49,16 @@ To use the private api commands you first need an api key and secret (supplied b
4649
```python
4750
import poloniex
4851
polo = poloniex.Poloniex(key='your-Api-Key-Here-xxxx', secret='yourSecretKeyHere123456789')
52+
4953
# or this works
5054
polo.key = 'your-Api-Key-Here-xxxx'
5155
polo.secret = 'yourSecretKeyHere123456789'
56+
5257
# get your balances
5358
balance = polo.returnBalances()
5459
print("I have %s ETH!" % balance['ETH'])
55-
# or
60+
61+
# or use '__call__'
5662
balance = polo('returnBalances')
5763
print("I have %s BTC!" % balance['BTC'])
5864
```
@@ -68,7 +74,7 @@ print(polo.marketTradeHist('BTC_ETH'))
6874
print(polo.returnTradeHistory('BTC_ETH'))
6975
```
7076

71-
You can also not use the 'helper' methods at all and use `poloniex.PoloniexBase` which only has `returnMarketHist`, `__call__` to make rest api calls.
77+
You can also not use the 'helper' methods at all and use `poloniex.PoloniexBase` which only has `returnMarketHist` and `__call__` to make rest api calls.
7278

7379
#### Websocket Usage:
7480
To connect to the websocket api just create a child class of `PoloniexSocketed` like so:

examples/README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
# Examples
2-
#### _Examples require [this poloniex module](https://github.com/s4w3d0ff/python-poloniex) to be installed._
2+
##### _Examples require [this poloniex module](https://github.com/s4w3d0ff/python-poloniex) to be installed._
33

44
## Chart:
5-
Saves chart data in a mongodb collection and returns a pandas dataframe with basic indicators.
6-
### Requirements:
7-
pip:
5+
Saves chart data in a mongodb collection and returns a pandas dataframe.
6+
#### Requirements:
87
```
98
pandas
109
numpy
1110
pymongo
11+
tqdm
1212
```
1313
Chart examples require [mongod](https://www.mongodb.com/) running locally.
1414

1515
## Loanbot:
1616
Helps your loan offers get filled and keeps them from going 'stale'
17-
### Requirements:
18-
Just [this git repository](https://github.com/s4w3d0ff/python-poloniex).
19-
2017

2118
## Websocket:
2219
Examples of how to use the websocket api to create tickers, stoplimits, etc.
23-
### Requirements:
24-
Just [this git repository](https://github.com/s4w3d0ff/python-poloniex) v0.5+.
25-
`mongoTicker.py` requires pymongo and mongod running.
20+
21+
### Projects using `python-poloniex`:
22+
- [donnie](https://github.com/s4w3d0ff/donnie) - 'Poloniex tradebot toolkit for Python 3+'

examples/chart/README.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
chart.py - saves chart data in a mongodb collection and returns a pandas dataframe with basic indicators
1+
mongoDataframe.py - saves chart data in a mongodb collection and returns a pandas dataframe
22

33
Requires:
44
```
55
pandas
66
numpy
77
pymongo
8-
```
9-
10-
bokehPlotter.py - same as chart.py with an added `graph` method that plots the data (with indicators) using bokeh
11-
12-
Requires:
13-
```
14-
pandas
15-
numpy
16-
pymongo
17-
bokeh
8+
tqdm
189
```

0 commit comments

Comments
 (0)