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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file vexbi-0.0.1.1.tar.gz.

File metadata

  • Download URL: vexbi-0.0.1.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.0

File hashes

Hashes for vexbi-0.0.1.1.tar.gz
Algorithm Hash digest
SHA256 1d0b0c69550bfb0946c6867ab34fa6abca15db78f35e595132e3861617e16502
MD5 7b61f636649238664fc56a005e7c3b29
BLAKE2b-256 044fa828e0e5b63c3d040293c5b5d5632340cf34cb3e5d043cc752e8ed09ace9

See more details on using hashes here.

File details

Details for the file vexbi-0.0.1.1-py3-none-any.whl.

File metadata

  • Download URL: vexbi-0.0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.0

File hashes

Hashes for vexbi-0.0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f27f5a87e202cc1fe222aa80697d11cd755e6127504ee27747435b9d823afac
MD5 d635422a2f303d84cd50f85620168f3d
BLAKE2b-256 c1cb81407624d8eac846b04c5639bcd9b00eb0227c7541bafb9120d506180bf4

See more details on using hashes here.

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