Vega API client for gRPC and REST
Project description
Vega API client
This is the Vega API client, which can talk to a Vega node using gRPC or REST.
Example
from google.protobuf.empty_pb2 import Empty
import vegaapiclient as vac
# Either gRPC
api = vac.API.GRPC
url = "veganode.example.com:1234"
# Or REST
# api = vac.API.REST
# url = "https://veganode.example.com"
# Create client for accessing public data
datacli = vac.VegaTradingDataClient(api, url)
# Create client for trading (e.g. submitting orders)
tradingcli = vac.VegaTradingClient(api, url)
# Get a list of markets
markets = datacli.Markets(Empty()).markets
# Get a specific market by ID
req = vac.grpc.api.trading.MarketByIDRequest(marketID="MARKETID")
market = datacli.MarketByID(req)
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
Vega API client-0.0.11.tar.gz
(36.3 kB
view hashes)
Built Distribution
Close
Hashes for Vega_API_client-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52ed543518e46fefc707b21e0bd185ceadd39092a20202d987dec5d826b488f5 |
|
MD5 | b5840c2ca6503bea48c0ce362a8d57db |
|
BLAKE2b-256 | 3c7036bb20a6b01148238b7d1858ebbd8db09a3c776ce86feb9bc46a6a0f9a3b |