Skip to main content

Python API Client library for Vexbi.com

Project description

Coverage Status Build Status PyPI version

Python library for Vexbi API. Please read our documentation for instructions on how to start using the API.

Requirements

  • Python 2.7.0+

  • Git 1.7.0+

Getting started

install dependencies:

pip install -r requirements.txt

Usage

#create_order

/v2/orders

*POST*

Summary: Create a Sell/Buy order. Description: Create a Sell/Buy order.

Parameters

Name

Located in

Description

Required

Schem a

marke t

formData

Unique market id. It’s always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. ‘btcusd’. All available markets can be found at /api/v2/mark ets.

Yes

strin g

side

formData

Either ‘sell’ or ‘buy’.

Yes

strin g

volum e

formData

The amount user want to sell/buy. An order could be partially executed, e.g. an order sell 5 btc can be matched with a buy 3 btc order, left 2 btc to be sold; in this case the order’s volume would be ‘5.0’, its remaining_v olume would be ‘2.0’, its executed volume is ‘3.0’.

Yes

strin g

price

formData

Price for each unit. e.g. If you want to sell/buy 1 btc at 3000 usd, the price is ‘3000.0’

No

strin g

ord_ type

formData

The type of order, can be market or limit

No (defaults to limit

strin g

Responses

Code

Description

201

Create a Sell/Buy order.

#delete_order

/v2/order/delete

*POST*

Summary: Cancel an order. Description: Cancel an order.

Parameters

Name

Located in

Description

Required

Schema

id

formData

Unique order id.

Yes

integer

Responses

Code

Description

201

Cancel an order.

#clear_all

/v2/orders/clear

*POST*

Summary: Cancel all my orders. Description: Cancel all my orders.

Parameters

Name

Located in

Description

Required

Schem a

side

formData

If present, only sell orders (asks) or buy orders (bids) will be canncelled.

No

strin g

Responses

Code

Description

201

Cancel all my orders.

#get_orders

/v2/orders

*GET*

Summary: Get your orders, results is paginated. Description: Get your orders, results is paginated.

Parameters

Name

Located in

Description

Required

Schem a

marke t

query

Unique market id. It’s always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. ‘btcusd’. All available markets can be found at /api/v2/mark ets.

Yes

strin g

state

query

Filter order by state, default to ‘wait’ (active orders).

No

strin g

limit

query

Limit the number of returned orders, default to 100.

No

integ er

page

query

Specify the page of paginated results.

No

integ er

order _by

query

If set, returned orders will be sorted in specific order, default to ‘asc’.

No

strin g

Responses

Code

Description

200

Get your orders, results is paginated.

#get_order

/v2/order

*GET*

Summary: Get information of specified order. Description: Get information of specified order.

Parameters

Name

Located in

Description

Required

Schema

id

query

Unique order id.

Yes

integer

#get_account_info

/v2/members/me

*GET*

Summary: Get your profile and accounts info. Description: Get your profile and accounts info.

Responses

Code

Description

200

Get your profile and accounts info.

#get_available_markets

/v2/markets

*GET*

Summary: Get all available markets.

Description: Get all available markets.

Responses

Code

Description

200

Get all available markets.

#tickers

/v2/tickers

*GET*

Summary: Get ticker of all markets. Description: Get ticker of all markets.

Responses

Code

Description

200

Get ticker of all markets.

#trades

/v2/trades

*GET*

Summary: Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order. Description: Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.

Parameters

Name

Located in

Description

Required

Schem a

marke t

query

Unique market id. It’s always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. ‘btcusd’. All available markets can be found at /api/v2/mark ets.

Yes

strin g

limit

query

Limit the number of returned trades. Default to 50.

No

integ er

times tamp

query

An integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.

No

integ er

from

query

Trade id. If set, only trades created after the trade will be returned.

No

integ er

to

query

Trade id. If set, only trades created before the trade will be returned.

No

integ er

order _by

query

If set, returned trades will be sorted in specific order, default to ‘desc’.

No

strin g

Responses

Code

Description

200

Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.

#my_trades

/v2/trades/my

*GET*

Summary: Get your executed trades. Trades are sorted in reverse creation order. Description: Get your executed trades. Trades are sorted in reverse creation order.

Parameters

Name

Located in

Description

Required

Schem a

marke t

query

Unique market id. It’s always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. ‘btcusd’. All available markets can be found at /api/v2/mark ets.

Yes

strin g

limit

query

Limit the number of returned trades. Default to 50.

No

integ er

times tamp

query

An integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.

No

integ er

from

query

Trade id. If set, only trades created after the trade will be returned.

No

integ er

to

query

Trade id. If set, only trades created before the trade will be returned.

No

integ er

order _by

query

If set, returned trades will be sorted in specific order, default to ‘desc’.

No

strin g

Responses

Code

Description

200

Get your executed trades. Trades are sorted in reverse creation order.

Test

Just clone the repo, install dependencies as you would in development and run nose2 or python setup.py test

Contributing

  1. Fork it ( https://github.com/vexbiexchange/python-api-client/fork )

  2. Create your feature branch (git checkout -b my-new-feature)

  3. Commit your changes (git commit -am 'Add some feature')

  4. Push to the branch (git push origin my-new-feature)

  5. Create a new Pull Request

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vexbi-0.0.1.1.tar.gz (10.8 kB view hashes)

Uploaded Source

Built Distribution

vexbi-0.0.1.1-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page