Indodax
PyPI version 1.3.2 Modul ini untuk trading di indodax
Install
pip install indodax
Cara Penggunaan
Melihat Harga
$ python
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from indodax import indodax
>>> indodax.get_price('btc') #contoh melihat harga BTC
{'ticker': {'high': '186608000', 'low': '173463000', 'vol_btc': '277.39109788', 'vol_idr': '49592483275', 'last': '186306000', 'buy': '186305000', 'sell': '186306000', 'server_time': 1603298398}}
Melihat Info Saldo
pertama anda harus mengambil key dan secret di akun anda, jika sudah ada silahkan ikuti instruksi ini sebagai langkah awal:
>>> key = 'YOUR_KEY'
>>> secret = b'YOUR_SECRET'
>>> a = indodax(key, secret)
>>> a.get_info() # anggap saja ini adalah informasi saldo dan alamat qurenncy anda
{ "succses": '1',
...
Melihat History
>>> a.history() # Anggap saja history anda sudah ada
...
Melihat Order Baru/Di Tahan
idr_or_btc adalah variable dimana anda membeli/menjual dengan BTC atau IDR pilihannya hanya 2 saja, tetapi default adalah IDR. jika anda membeli/menjual dengan IDR maka idr_or_btc abaikan saja.
>>> a.open_order('btc', idr_or_btc='idr') # Contoh saya membeli BTC, disini anda akn melihat order id anda
...
Melihat Riwayat Order
>>> a.order_history('btc') # Anggap saja semua order terlihat
...
Trade Buy/Sell
Pemanggilan fungsi trade, fungsi trade ada 2 yaitu trade_buy(coin, diharga, jumlah, idr_or_btc='idr') dan trade_sell(coin, diharga, jumlah, idr_or_btc='idr'). variable coin adalah jenis qurency, variable diharga adalah harga qurency-nya, variable jumlah adalah nilai pembelian/penjualan, idr_or_btc='idr' abaikan jika IDR
Buy
>>> a.trade_buy('btc', '186306000', '50000') # ini jika anda membeli dengan IDR
...
Sell
>>> a.trade_sell('btc', '190000000', '0.005') # anggap saja saya menjual BTC di harga 190Juta
...
Instan Order
instan_trade(coin, jumlah, type) digunakan untuk order secara instan.
cara penggunaan instan_trade("trx", 10000, 'buy or sell')
Cancel Order
Disini menggunakan 2 fungsi yaitu cancel_order_buy(coin, order_id, idr_or_btc='idr') dan cancel_order_sell(coin, order_id, idr_or_btc='idr'). order_id dari open_order(...).
Buy
>>> a.cancel_order_buy('btc', '12345') # Kalau order id-nya benar, akan ada result succses = 1
...
Sell
>>> a.cancel_order_sell('btc', '12345') # Hampir sama dengan Buy, tapi tergantung type pembelian atau penjualan
...
Withdraw
fungsi withdraw withdraw(coin, address, amount, memo='', req_id=''). Fungsi ini membutuhkan urlcallback agar dapat bekerja dengan baik.
>>> a.withdraw('doge', 'D7rzpq91xmUVkER6E1ndfinRjRS4jvBkgV', '100') # memo hanya untuk address yg menggunakan memo
...
Donate
Jika anda suka dengan modul ini anda bisa donasi di bawah ini
BTC : 3BqqfUGaARBBCkMN6w6nV7hYjikvac3dJ4
BCHABC : qzdt37fmnftrm8xr50vxza640f48sfnlyqlsfjpyzk
DOGE : D7rzpq91xmUVkER6E1ndfinRjRS4jvBkgV
LTC : M9nQQZXwHQaoNStJrBcr6UfdCqx2RJHz5e
Metadata
Release files for indodax 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| indodax-1.3.2.tar.gz | 4.8 kB | Without provenance | Details for indodax-1.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| indodax-1.3.2-py3-none-any.whl | Python 3 | none | any | Details for indodax-1.3.2-py3-none-any.whl |
Total release size: 10.2 kB
Release files / indodax-1.3.2.tar.gz
| Download URL | indodax-1.3.2.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa06d9d12712260e0e4f813e31e1c8a0f5e49dafb95720aa1f42609ebb759ed3
|
|
BLAKE2b-256 checksum How to use checksums |
3f06af07e3977c71f2283417a786d36da8fb6c45da80f30795240613d7b8f294
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.6
|
Release files / indodax-1.3.2-py3-none-any.whl
| Download URL | indodax-1.3.2-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da2b2dd9a9efdd37c1f6b8aefe8deb0740a5849be4c2da97f8bb2fdf74d4ddd1
|
|
BLAKE2b-256 checksum How to use checksums |
94fad371ef585416cf5c5ed7a02588a03882d2f81bfa6df3928ede04ce7d9763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.6
|
Security for indodax 1.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.