Skip to content

Commit 0dee84e

Browse files
Add a local image and update the structure.
1 parent b3ff258 commit 0dee84e

File tree

2 files changed

+26
-34
lines changed

2 files changed

+26
-34
lines changed

README.md

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Crypto starts with Bitvavo. You use Bitvavo SDK for Python to buy, sell, and sto
1616

1717
To trade and execute your advanced trading strategies, Bitvavo SDK for Python is a wrapper that enables you to easily call every endpoint in [Bitvavo API](https://docs.bitvavo.com/)
1818

19+
- [Prerequisites](#prerequisites) - what you need to start developing with Bitvavo SDK for Python.
20+
- [Get started](#get-started) - rapidy create an app and start trading with Bitvavo.
21+
- [API reference](#api-reference) - in-depth information about Bitvavo SDK for Python
22+
1923
## Prerequisites
2024

2125
To start programming with Bitvavo SDK for Python you need:
@@ -37,7 +41,7 @@ To start programming with Bitvavo SDK for Python you need:
3741
3842
Best practice is to not grant his privilage, withdrawals using the API do not require 2FA and e-mail confirmation.
3943
40-
## Get started
44+
## Get started
4145
4246
Want to quickly make a first app? Here we go:
4347
@@ -143,22 +147,24 @@ Want to quickly make a first app? Here we go:
143147
Your app connects to Bitvavo and returns a list the latest trade price for each market. The callback cycles through the
144148
market data so you can implement your trading logic.
145149
146-
# Python Bitvavo Api
150+
## API reference
151+
147152
This is the python wrapper for the Bitvavo API. This project can be used to build your own projects which interact with the Bitvavo platform. Every function available on the API can be called through a REST request or over websockets. For info on the specifics of every parameter consult the [Bitvavo API documentation](https://docs.bitvavo.com/)
148153
149-
* Getting started [REST](https://github.com/bitvavo/python-bitvavo-api#getting-started) [Websocket](https://github.com/bitvavo/python-bitvavo-api#getting-started-1)
150-
* General
154+
* [General](#general)
155+
* Rate limiting [x-platform](#rate-limiting)
156+
* REST requests [x-platform](#rest-requests)
151157
* Time [REST](https://github.com/bitvavo/python-bitvavo-api#get-time) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-time-1)
152158
* Markets [REST](https://github.com/bitvavo/python-bitvavo-api#get-markets) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-markets-1)
153159
* Assets [REST](https://github.com/bitvavo/python-bitvavo-api#get-assets) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-assets-1)
154-
* Market Data
160+
* [Public market data](#public-market-data)
155161
* Book [REST](https://github.com/bitvavo/python-bitvavo-api#get-book-per-market) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-book-per-market-1)
156162
* Public Trades [REST](https://github.com/bitvavo/python-bitvavo-api#get-trades-per-market) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-trades-per-market-1)
157163
* Candles [REST](https://github.com/bitvavo/python-bitvavo-api#get-candles-per-market) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-candles-per-market-1)
158164
* Price Ticker [REST](https://github.com/bitvavo/python-bitvavo-api#get-price-ticker) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-price-ticker-1)
159165
* Book Ticker [REST](https://github.com/bitvavo/python-bitvavo-api#get-book-ticker) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-book-ticker-1)
160166
* 24 Hour Ticker [REST](https://github.com/bitvavo/python-bitvavo-api#get-24-hour-ticker) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-24-hour-ticker-1)
161-
* Private
167+
* [Private trading data](#private-trading-data)
162168
* Place Order [REST](https://github.com/bitvavo/python-bitvavo-api#place-order) [Websocket](https://github.com/bitvavo/python-bitvavo-api#place-order-1)
163169
* Update Order [REST](https://github.com/bitvavo/python-bitvavo-api#update-order) [Websocket](https://github.com/bitvavo/python-bitvavo-api#update-order-1)
164170
* Get Order [REST](https://github.com/bitvavo/python-bitvavo-api#get-order) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-order-1)
@@ -173,7 +179,7 @@ This is the python wrapper for the Bitvavo API. This project can be used to buil
173179
* Withdraw Assets [REST](https://github.com/bitvavo/python-bitvavo-api#withdraw-assets) [Websocket](https://github.com/bitvavo/python-bitvavo-api#withdraw-assets-1)
174180
* Deposit History [REST](https://github.com/bitvavo/python-bitvavo-api#get-deposit-history) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-deposit-history-1)
175181
* Withdrawal History [REST](https://github.com/bitvavo/python-bitvavo-api#get-withdrawal-history) [Websocket](https://github.com/bitvavo/python-bitvavo-api#get-withdrawal-history-1)
176-
* [Subscriptions](https://github.com/bitvavo/python-bitvavo-api#subscriptions)
182+
* [Subscriptions](#subscriptions)
177183
* [Ticker Subscription](https://github.com/bitvavo/python-bitvavo-api#ticker-subscription)
178184
* [Ticker 24 Hour Subscription](https://github.com/bitvavo/python-bitvavo-api#ticker-24-hour-subscription)
179185
* [Account Subscription](https://github.com/bitvavo/python-bitvavo-api#account-subscription)
@@ -182,41 +188,26 @@ This is the python wrapper for the Bitvavo API. This project can be used to buil
182188
* [Book Subscription](https://github.com/bitvavo/python-bitvavo-api#book-subscription)
183189
* [Book subscription with local copy](https://github.com/bitvavo/python-bitvavo-api#book-subscription-with-local-copy)
184190
191+
### General
185192
186-
## Installation
187-
```
188-
pip install python-bitvavo-api
189-
```
193+
#### Rate limiting
190194
191-
## Rate Limiting
195+
Bitvavo uses a weight based rate limiting system. Your app is limited to 1000 weight points per IP or API key per
196+
minute. When you make a call to Bitvavo API, your remaining weight points are returned in the header of each REST request.
192197
193-
Bitvavo uses a weight based rate limiting system, with an allowed limit of 1000 per IP or API key each minute. Please inspect each endpoint in the [Bitvavo API documentation](https://docs.bitvavo.com/) to see the weight. Failure to respect the rate limit will result in an IP or API key ban.
194-
Since the remaining limit is returned in the header on each REST request, the remaining limit is tracked locally and can be requested through:
198+
Websocket functions do not return your returning weight points, you track your remaining weight points with a call to:
195199
```
196200
limit = bitvavo.getRemainingLimit()
197201
```
198-
The websocket functions however do not return a remaining limit, therefore the limit is only updated locally once a ban has been issued.
199202
200-
## REST requests
203+
If you make more requests than permitted by the weight limit, your IP or API key is banned.
201204
202-
The general convention used in all functions (both REST and websockets), is that all optional parameters are passed as an dictionary, while required parameters are passed as separate values. Only when [placing orders](https://github.com/bitvavo/python-bitvavo-api#place-order) some of the optional parameters are required, since a limit order requires more information than a market order. The returned responses are all converted to a dictionary as well, such that `response['<key>'] = '<value>'`.
205+
The rate weighting for each endpoint is supplied in the [Bitvavo API documentation](https://docs.bitvavo.com/).
203206
204-
### Getting started
207+
#### REST requests
205208
206-
The API key and secret are required for private calls and optional for public calls. The access window and debugging parameter are optional for all calls. The access window is used to determine whether the request arrived within time, the value is specified in milliseconds. You can use the [time](https://github.com/bitvavo/python-bitvavo-api#get-time) function to synchronize your time to our server time if errors arise. REST url and WS url can be used to set a different endpoint (for testing purposes). Debugging should be set to true when you want to log additional information and full responses. Any parameter can be omitted, private functions will return an error when the api key and secret have not been set.
207-
```python
208-
from python_bitvavo_api.bitvavo import Bitvavo
209-
bitvavo = Bitvavo({
210-
'APIKEY': '<APIKEY>',
211-
'APISECRET': '<APISECRET>',
212-
'RESTURL': 'https://api.bitvavo.com/v2',
213-
'WSURL': 'wss://ws.bitvavo.com/v2/',
214-
'ACCESSWINDOW': 10000,
215-
'DEBUGGING': False
216-
})
217-
```
218-
219-
### General
209+
For all functions, required parameters are passed as separate values, optional parameters are passed as a dictionary;
210+
return parameters are in dictionary format such that `response['<key>'] = '<value>'`. Only when [placing orders](https://github.com/bitvavo/python-bitvavo-api#place-order) some of the optional parameters are required, since a limit order requires more information than a market order.
220211
221212
#### Get time
222213
```python
@@ -698,7 +689,7 @@ print(response)
698689
```
699690
</details>
700691

701-
### Private
692+
### Private trading data
702693

703694
#### Place order
704695
When placing an order, make sure that the correct optional parameters are set. For a limit order it is required to set both the amount and price. A market order is valid if either amount or amountQuote is set.
@@ -1271,7 +1262,7 @@ except KeyboardInterrupt:
12711262

12721263
The api key and secret are copied from the bitvavo object. Therefore if you want to use the private portion of the websockets API, you should set both the key and secret as specified in [REST requests](https://github.com/bitvavo/python-bitvavo-api#rest-requests).
12731264

1274-
### Public
1265+
### Public market data
12751266

12761267
#### Get time
12771268
```python
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)