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.0.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.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_deepcoin-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 ed7ec787f9a2735fb135cdcd20574a605787df2fcff7347f896a166445174046
MD5 34fef3ec22a909dd8426f2600b195a30
BLAKE2b-256 3250cc8f800c662a7c61d428689597038a1e06cc4dccf398c3d45ef012fea56a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_deepcoin-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ed53c36878a89ccca67b5a015f2be38d1263460bbddb56edeaa99c86c11df54
MD5 b1435cb24f29398cb08a730faf37bef8
BLAKE2b-256 ae9b2e32e09078011a2d2bcb011ff707b5fde107bf1c7f0a9758e856157bfa31

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