Kaiko SDK
Project description
kaikosdk
Python client library for the Kaiko gRPC API. This SDK provides auto-generated gRPC stubs for streaming cryptocurrency market data.
Installation
pip install kaikosdk
Requirements
- Python 3.9+
- A valid Kaiko API key
Usage
import grpc
from kaikosdk import sdk_pb2_grpc
from kaikosdk.stream.trades_v1 import request_pb2 as trades_request
from kaikosdk.core import instrument_criteria_pb2
channel = grpc.secure_channel("gateway-v0-grpc.kaiko.ovh:443", grpc.ssl_channel_credentials())
stub = sdk_pb2_grpc.StreamTradesServiceV1Stub(channel)
metadata = [("authorization", "Bearer <YOUR_API_KEY>")]
request = trades_request.StreamTradesRequestV1(
instrument_criteria=instrument_criteria_pb2.InstrumentCriteria(
exchange="cbse",
instrument_class="spot",
code="btc-usd",
)
)
for response in stub.Subscribe(request, metadata=metadata):
print(f"Trade: {response}")
Available Services
All services expose a Subscribe method that returns a server-side stream.
| Service | Description |
|---|---|
StreamTradesServiceV1 |
Real-time trades |
StreamMarketUpdateServiceV1 |
Market updates |
StreamAggregatedQuoteServiceV2 |
Aggregated quotes |
StreamAggregatedPriceServiceV1 |
Aggregated prices |
StreamAggregatedStatePriceServiceV1 |
Aggregated state prices |
StreamAggregatesOHLCVServiceV1 |
OHLCV aggregates |
StreamAggregatesVWAPServiceV1 |
VWAP aggregates |
StreamAggregatesSpotExchangeRateV2ServiceV1 |
Spot exchange rates |
StreamAggregatesSpotDirectExchangeRateV2ServiceV1 |
Direct exchange rates |
StreamOrderbookL2ServiceV1 |
Level 2 order book |
StreamOrderbookL2ReplayServiceV1 |
Level 2 order book replay |
StreamIndexServiceV1 |
Index values |
StreamIndexMultiAssetsServiceV1 |
Multi-asset index values |
StreamIndexForexRateServiceV1 |
Index forex rates |
StreamCompositeIndicesServiceV1 |
Composite indices |
StreamConstantDurationIndicesServiceV1 |
Constant duration indices |
StreamExoticIndicesServiceV1 |
Exotic indices |
StreamDerivativesInstrumentMetricsServiceV1 |
Derivatives instrument metrics |
StreamIvSviParametersServiceV1 |
IV SVI parameters |
Examples
For more complete examples, see the kaiko-sdk-examples repository.
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
kaikosdk-1.36.0.tar.gz
(26.7 kB
view details)
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
kaikosdk-1.36.0-py3-none-any.whl
(87.2 kB
view details)
File details
Details for the file kaikosdk-1.36.0.tar.gz.
File metadata
- Download URL: kaikosdk-1.36.0.tar.gz
- Upload date:
- Size: 26.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdd9907576c63e8f3c821e6d615f9403eaeb29a98b54d7282c22070b4b385201
|
|
| MD5 |
2b94cb34f9aa70ff1f5ccd637b3963b5
|
|
| BLAKE2b-256 |
93d564d2298641cb70d0b40324b1ea73dba514d45ef820267500571753300134
|
File details
Details for the file kaikosdk-1.36.0-py3-none-any.whl.
File metadata
- Download URL: kaikosdk-1.36.0-py3-none-any.whl
- Upload date:
- Size: 87.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7a5538a69dd444f582507463ccf65d77b24123469b634f0dea5996ef37094c5
|
|
| MD5 |
9e9d393889008a82e7e6829252876d0a
|
|
| BLAKE2b-256 |
38969a8cc932025e5f85ce39e6e75bf22222774ec65c4066082ea6b754142d23
|