Skip to main content

About

This library provides python bindings for the CampBX bitcoin trading platform. To obtain API access please see the documenation at CampBX.

Note:

All endpoints that require authentication are using HTTPS.

Installation

pip install campbx

Documentation

Read the full documentation on ReadTheDocs.

Quick Usage

The API does not require a username and password, however you will have limited access to only the public endpoints.

Initializing the API:

from campbx import CampBX
c = CampBX('username', 'password')

Getting market ticker:

c.xticker()

{'Best Ask': '5.17', 'Best Bid': '5.07', 'Last Trade': '5.07'}

Check your account balance:

c.my_funds()

{'Liquid BTC': '0.00000000',
 'Liquid USD': '2.19',
 'Margin Account BTC': '0.00000000',
 'Margin Account USD': '0.00',
 'Total BTC': '15.00000000',
 'Total USD': '74.58'}

Check your open orders:

c.my_orders()

{'Buy': [{'Dark Pool': 'No',
   'Fill Type': 'Incremental',
   'Margin Percent': 'None',
   'Order Entered': '2012-04-10 08:59:51',
   'Order Expiry': '2012-05-11 00:00:00',
   'Order ID': '239801',
   'Order Type': 'Quick Buy',
   'Price': '4.50',
   'Quantity': '16.00000000',
   'Stop-loss': 'No'}],
 'Sell': [{'Dark Pool': 'No',
   'Fill Type': 'Incr',
   'Margin Percent': 'None',
   'Order Entered': '2012-04-05 22:07:05',
   'Order Expiry': '2012-05-06 00:00:00',
   'Order ID': '215603',
   'Order Type': 'Quick Sell',
   'Price': '5.20',
   'Quantity': '15.00000000',
   'Stop-loss': 'No'}]}

License

MIT License

Copyright (c) 2011 Glen Zangirolami

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Release files for campbx 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for campbx 1.0.5
File Size Uploaded
campbx-1.0.5.tar.gz 3.7 kB Details

Release files / campbx-1.0.5.tar.gz

Download URL campbx-1.0.5.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
89b2b5acc82e510c02e8652a0af20978927d870f96feb8b9534cd5ffe690e35c
BLAKE2b-256 checksum
How to use checksums
0c7fd7654b76522720b80ec520352bcc4dc6bb8c5a6ca8cd6ff29cf73e0af407
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.5 This release

1 release file

1.0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page