-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
130 lines (101 loc) · 3.75 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
"""
======
CampBX
======
About
=====
This library provides python bindings for the `CampBX bitcoin trading platform <http://campbx.com>`_.
To obtain API access please `see the documenation at CampBX <https://campbx.com/api.php>`_.
Note::
All endpoints that require authentication are using HTTPS.
Installation
============
``pip install campbx``
Documentation
=============
Read the full documentation on `ReadTheDocs <http://campbx.readthedocs.org/>`_.
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 <http://www.opensource.org/licenses/mit-license.php>`_
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.
"""
from distutils.core import setup
setup(
author = 'Glen Zangirolami',
author_email = '[email protected]',
description = 'CampBX API Bindings',
long_description = __doc__,
fullname = 'campbx',
name = 'campbx',
url = 'https://github.com/glenbot/campbx',
download_url = 'https://github.com/glenbot/campbx',
version = '1.0.5',
license = 'MIT',
platforms = ['Linux','Windows'],
packages = ['campbx'],
install_requires = ['simplejson'],
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Software Development :: Libraries'
]
)