Add your description here
Project description
GMO Coin Python Client Library
A Python client library for interacting with the GMO Coin cryptocurrency exchange API.
📘 GMO Coin API Coverage
Usage
Set GMO_API_KEY and GMO_SECRET_KEY in your environment for private API calls.
Public endpoints
from gmocoin_client import Client
client = Client()
status = client.get_status()
ticker = client.get_ticker("BTC")
orderbooks = client.get_orderbooks("BTC")
Private endpoints (with env vars)
from gmocoin_client import Client
with Client.from_env() as client:
assets = client.get_assets()
margin = client.get_margin()
Place an order
from gmocoin_client import Client
with Client.from_env() as client:
order = client.create_order(
symbol="BTC_JPY",
side="BUY",
execution_type="LIMIT",
time_in_force="FAS",
price="430001",
size="0.02",
)
WebSocket access token
from gmocoin_client import Client
with Client.from_env() as client:
token = client.ws_auth_create()
Error handling
from gmocoin_client import GmoCoinApiError, Client, GmoCoinHttpError
client = Client()
try:
client.get_ticker("BTC")
except GmoCoinApiError as exc:
print(exc)
except GmoCoinHttpError as exc:
print(exc)
Live trading tests (local-only)
Live tests are excluded by default. To run them locally, opt in and set required
environment variables (see .env.example). Tests load .env automatically:
export GMO_LIVE_TESTS=true
export GMO_API_KEY="your_api_key"
export GMO_SECRET_KEY="your_secret_key"
export GMO_LIVE_SYMBOL="BTC"
export GMO_LIVE_SIZE="0.0001"
export GMO_LIVE_BUY_EXECUTION_TYPE="MARKET"
export GMO_LIVE_SELL_EXECUTION_TYPE="MARKET"
Then run:
pytest -m live
Public REST API
| Category | Endpoint / Function | Path | Implemented |
|---|---|---|---|
| Exchange status | /public/v1/status |
✅ | |
| Latest ticker (rate) | /public/v1/ticker |
✅ | |
| Order book | /public/v1/orderbooks |
✅ | |
| Trades | /public/v1/trades |
✅ | |
| K-Line (OHLCV) | /public/v1/klines |
✅ | |
| Trading rules / symbols | /public/v1/symbols |
✅ |
Private REST API
| Category | Endpoint / Function | Path | Implemented |
|---|---|---|---|
| Collateral / margin summary | /private/v1/account/margin |
✅ | |
| Asset balances | /private/v1/account/assets |
✅ | |
| Trading volume info | /private/v1/account/tradingVolume |
✅ | |
| JPY deposit history | /private/v1/account/fiatDeposit/history |
✅ | |
| JPY withdrawal history | /private/v1/account/fiatWithdrawal/history |
✅ | |
| Crypto deposit history | /private/v1/account/deposit/history |
✅ | |
| Crypto withdrawal history | /private/v1/account/withdrawal/history |
✅ | |
| Query orders | /private/v1/orders |
✅ | |
| Active orders | /private/v1/activeOrders |
✅ | |
| Executions | /private/v1/executions |
✅ | |
| Latest executions | /private/v1/latestExecutions |
✅ | |
| Open positions | /private/v1/openPositions |
✅ | |
| Position summary | /private/v1/positionSummary |
✅ | |
| Internal transfer | /private/v1/account/transfer |
✅ | |
| Place order | /private/v1/order (POST) |
✅ | |
| Change order | /private/v1/changeOrder |
✅ | |
| Cancel order | /private/v1/cancelOrder |
✅ | |
| Cancel multiple orders | /private/v1/cancelOrders |
✅ | |
| Cancel bulk orders | /private/v1/cancelBulkOrder |
✅ | |
| Cancel all orders | /private/v1/cancelAll |
❌ | |
| Close (settlement) order | /private/v1/closeOrder |
✅ | |
| Bulk close orders | /private/v1/closeBulkOrder |
✅ | |
| Change loss-cut price | /private/v1/changeLosscutPrice |
✅ |
Public WebSocket API
| Category | Endpoint / Function | Path | Implemented |
|---|---|---|---|
| Subscribe: ticker updates | wss://api.coin.z.com/ws/public (channel=ticker) |
❌ | |
| Subscribe: order book | wss://api.coin.z.com/ws/public (channel=orderbooks) |
❌ | |
| Subscribe: trades | wss://api.coin.z.com/ws/public (channel=trades) |
❌ |
Private WebSocket API
| Category | Endpoint / Function | Path | Implemented |
|---|---|---|---|
| Obtain access token | /private/v1/ws-auth (POST) |
✅ | |
| Extend access token | /private/v1/ws-auth (PUT) |
✅ | |
| Revoke access token | /private/v1/ws-auth (DELETE) |
✅ | |
| Subscribe: order events | wss://api.coin.z.com/ws/private (channel=orderEvents) |
❌ | |
| Subscribe: execution events | wss://api.coin.z.com/ws/private (channel=executionEvents) |
❌ | |
| Subscribe: position events | wss://api.coin.z.com/ws/private (channel=positionEvents) |
❌ | |
| Subscribe: position summary events | wss://api.coin.z.com/ws/private (channel=positionSummaryEvents) |
❌ |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gmocoin_client-0.2.0.tar.gz.
File metadata
- Download URL: gmocoin_client-0.2.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26aa468a1f828f2bc47f577a0fd510e58816b6f18ccb714670e0f7158f4f66a
|
|
| MD5 |
9f50145d5078caff67586041c7b5ab42
|
|
| BLAKE2b-256 |
c3ed86c55b244ce06ee8c82ad88217817916576f4bcd37ec0b467dc18b00e274
|
Provenance
The following attestation bundles were made for gmocoin_client-0.2.0.tar.gz:
Publisher:
publish.yml on Shion1305/gmocoin-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gmocoin_client-0.2.0.tar.gz -
Subject digest:
d26aa468a1f828f2bc47f577a0fd510e58816b6f18ccb714670e0f7158f4f66a - Sigstore transparency entry: 858462584
- Sigstore integration time:
-
Permalink:
Shion1305/gmocoin-client@9775bc7420c55f93146d5e0f6148e0cdf847f0ac -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Shion1305
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9775bc7420c55f93146d5e0f6148e0cdf847f0ac -
Trigger Event:
push
-
Statement type:
File details
Details for the file gmocoin_client-0.2.0-py3-none-any.whl.
File metadata
- Download URL: gmocoin_client-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f298d0ecf3e7fbb28bfd3e7f42f6b694151f740d0edb64099342657b9dcd9d8
|
|
| MD5 |
855d55b02868fde12edf61373df7d75d
|
|
| BLAKE2b-256 |
9d0ea3c7635ffd77a0a865a2b7d133ab53fcfd6958fce91e81b36fa00fa34251
|
Provenance
The following attestation bundles were made for gmocoin_client-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Shion1305/gmocoin-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gmocoin_client-0.2.0-py3-none-any.whl -
Subject digest:
6f298d0ecf3e7fbb28bfd3e7f42f6b694151f740d0edb64099342657b9dcd9d8 - Sigstore transparency entry: 858462705
- Sigstore integration time:
-
Permalink:
Shion1305/gmocoin-client@9775bc7420c55f93146d5e0f6148e0cdf847f0ac -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Shion1305
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9775bc7420c55f93146d5e0f6148e0cdf847f0ac -
Trigger Event:
push
-
Statement type: