Skip to main content

Unofficial Python wrapper for the DeepCoin API (REST + WebSocket)

Project description

Welcome to python-deepcoin v0.2.0

This is an unofficial Python wrapper for the DeepCoin API This package provides an easy-to-use, Pythonic interface for interacting with DeepCoin's REST and WebSocket APIs, supporting both spot and derivatives trading.

Features

  • Account Endpoints

    • get_balances() – Get Account Balance
    • get_bills() – Get Bills
    • get_positions() – Get Positions
    • set_leverage() – Set Leverage
  • Market Endpoints

    • get_order_book() – Get Order Book
    • get_candles() – Get K-line Data
    • get_instruments() – Get Product Info
    • get_tickers() – Get Market Tickers
  • Trade Endpoints

    • place_order() – Place Order
    • replace_order() – Amend Order
    • cancel_order() - Cancel Order
    • batch_cancel_order() – Batch Cancel Orders
    • cancel_all_swap_orders() – Cancel All Orders
    • get_fills() – Get Trade Details
    • get_order_by_id() - Get Order by ID
    • get_finished_order_by_id() – Get Historical Order by ID
    • get_orders_history() – Order History
    • get_orders_pending() – Get All Pending Orders
    • get_funding_rate_cycle() – Get Funding Rate
    • get_current_funding_rate() - Get Current Funding Rate
    • get_funding_rate_history() - Get Funding Rate History
    • replace_order_sltp() - Modify Take Profit and Stop Loss for Open Limit Orders
  • WebSocket

    • Public
    • Private

Quick Start

Installation

Install via pip:

pip install python-deepcoin

Authentication

Most endpoints require authentication. To begin, initialize the client with your API key and secret:

from deepcoin import DeepcoinClient

client = DeepcoinClient(
    api_key='your_api_key',
    api_secret='your_api_secret',
    passphrase='your_api_passphrase'
)

Example Usage

Get Account Balance

balance = client.get_balances()
print(balance)

More Examples

You can find more usage examples in the examples/ folder.

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

python_deepcoin-0.2.1.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_deepcoin-0.2.1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file python_deepcoin-0.2.1.tar.gz.

File metadata

  • Download URL: python_deepcoin-0.2.1.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.11

File hashes

Hashes for python_deepcoin-0.2.1.tar.gz
Algorithm Hash digest
SHA256 5bc3fb8777a54508c654acbc94398f3ecd7bdc6552c3304723507a38f7583442
MD5 c6fc19dc2028982308c72deb2efb13d5
BLAKE2b-256 a6e3fd04e64d11388237a2f761d6558cd48912d040008355ae9f7600164b132a

See more details on using hashes here.

File details

Details for the file python_deepcoin-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_deepcoin-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 536b6e3355e30817d20460a286e6c6536639740761e7f1465a90fce8a97615a9
MD5 003a4c2a41f5aae8ecd7d19c6be17740
BLAKE2b-256 6c3e142f3d8382d2736604d59b929fa4659c8ffc90e3d0289b90a9298c1e39cb

See more details on using hashes here.

Supported by

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