SDKs, Libraries & Integration
Direct HTTP integration guide and Python SDK for GaiaEx. Source-only SDK with full type annotations and code examples.
SDKs & Libraries
GaiaEx provides a REST + WebSocket API that works with any HTTP client in any language. The Quick Start guide includes complete authentication and signing examples in 8 languages (Python, JavaScript, Go, Rust, C++, Java, C#, and curl).
DIRECT HTTP IS RECOMMENDED
The most reliable way to integrate with GaiaEx is via direct HTTP requests with HMAC-SHA256 signing. All endpoint pages in this documentation include ready-to-use code examples. No third-party package is required.
SDK SCOPE
SDKs and client libraries cover the trading and read APIs callable with API keys. They intentionally do not expose deposit, withdraw, on-chain transfer, or swap calls — those have no API-key path and are performed in the GaiaEx mobile app.
Python SDK (Source Only)
gaiaex-python is an open-source Python client that wraps the GaiaEx API. It is not published to PyPI — it must be installed from source.
NOT ON PyPI
pip install gaiaex-python will not work. The package is available as source code only. For production integrations, we recommend using direct HTTP requests as shown in the Quick Start guide.
| Feature | Details |
|---|---|
| Python | ≥ 3.10 |
| Sync HTTP | requests |
| Async HTTP | aiohttp |
| WebSocket | websockets |
| Source | github.com/gaiaex/gaiaex-python |
Install from Source
git clone https://github.com/gaiaex/gaiaex-python.git
cd gaiaex-python
pip install -e .Direct HTTP Integration (Recommended)
You can integrate with GaiaEx using any HTTP client. Here is a minimal Python example using only the standard library and requests:
import hmac, hashlib, time, json, requests
# Load credentials
with open("config.json") as f:
cfg = json.load(f)
API_KEY = cfg["api_key"]
API_SECRET = cfg["api_secret"]
ADDRESS = cfg["user_address"]
BASE_URL = "https://openapi.gaiaex.com/v1/trade"
def sign_request(method: str, path: str, body: str = "") -> dict:
timestamp = str(int(time.time() * 1000))
message = timestamp + method + path + body
signature = hmac.new(
API_SECRET.encode(), message.encode(), hashlib.sha256
).hexdigest()
return {
"X-GAIAEX-APIKEY": API_KEY,
"X-GAIAEX-TIMESTAMP": timestamp,
"X-GAIAEX-SIGNATURE": signature,
"Content-Type": "application/json",
}
# GET balance
path = f"/user/{ADDRESS}/balance"
resp = requests.get(BASE_URL + path, headers=sign_request("GET", path))
print(resp.json())
# POST place order
path = "/order"
body = json.dumps({
"user_address": ADDRESS,
"symbol": "ETH",
"is_buy": True,
"size": "0.1",
"price": "3500.00",
"order_type": "limit",
})
resp = requests.post(BASE_URL + path, headers=sign_request("POST", path, body), data=body)
print(resp.json())See the Quick Start guide for complete examples in 8 languages including JavaScript, Go, Rust, C++, Java, C#, and curl.
Community & Future SDKs
Official SDK packages for additional languages are planned but not yet available. In the meantime, the direct HTTP approach works with any language that supports HMAC-SHA256 and HTTP requests.
Code examples are provided on every endpoint page in this documentation to make integration straightforward regardless of your language choice.