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) |
❌ |
Metadata
Release files for gmocoin-client 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gmocoin_client-0.2.1.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gmocoin_client-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.9 kB
Release files / gmocoin_client-0.2.1.tar.gz
| Download URL | gmocoin_client-0.2.1.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d287b1c98ee2eb323ca8e05f595ef20cdc831060dbf26230f742097c89f8fe2a
|
|
BLAKE2b-256 checksum How to use checksums |
ce1ad9be02800fdb0d2ea121b4886e199b1711d67e9be79fb0773a2b8987f4b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 1, 2026.
Transparency logRelease files / gmocoin_client-0.2.1-py3-none-any.whl
| Download URL | gmocoin_client-0.2.1-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c53d18cf61e1667204956875c30a8065e9df6da016493bc21bca11494bdee023
|
|
BLAKE2b-256 checksum How to use checksums |
be07dda260a182afc506c1c996c2d14c24111e3146cf20f589baef91beb37996
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 1, 2026.
Transparency log