Skip to main content

Kaiko SDK

Project description

Kaiko

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


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.35.1.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kaikosdk-1.35.1-py3-none-any.whl (81.2 kB view details)

Uploaded Python 3

File details

Details for the file kaikosdk-1.35.1.tar.gz.

File metadata

  • Download URL: kaikosdk-1.35.1.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for kaikosdk-1.35.1.tar.gz
Algorithm Hash digest
SHA256 96bf3aa6963b77331073beab3d728aa186504255620d65d7ee456c2eb96a4502
MD5 59a5c377eb65e609fbd3af6e8edb1c3c
BLAKE2b-256 4b48235e368c4cd9ece5e500ba2f8d73a4939bb3b0a4f53d2b0882d6cd76fa91

See more details on using hashes here.

File details

Details for the file kaikosdk-1.35.1-py3-none-any.whl.

File metadata

  • Download URL: kaikosdk-1.35.1-py3-none-any.whl
  • Upload date:
  • Size: 81.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for kaikosdk-1.35.1-py3-none-any.whl
Algorithm Hash digest
SHA256 191e59d64b8c8e096efcf3022572b97d3b2a711f0c1e6945b3a6f817746ddcda
MD5 158d6005d20f5b3dd326788372965fb8
BLAKE2b-256 53c0c831f4761123436443ef0b7332d7b41cbc22cfa405c901077bf7334d3f43

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