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.12.tar.gz
(37.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
File details
Details for the file Vega API client-0.0.12.tar.gz.
File metadata
- Download URL: Vega API client-0.0.12.tar.gz
- Upload date:
- Size: 37.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a67aaaa9b5a4415be2f12bc228856b5a67573f0b04187e774c7fa6da827dc1
|
|
| MD5 |
953b58c43b7e4ba016ee8c7e2d4aadca
|
|
| BLAKE2b-256 |
99071438c6d225755e314c494abb0c89feaf67aace4f5b007ce7dcf4a63c4b89
|
File details
Details for the file Vega_API_client-0.0.12-py3-none-any.whl.
File metadata
- Download URL: Vega_API_client-0.0.12-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3097687823925eb24854e930bb5d458bfd3d69dd61a761865b43959bc8955619
|
|
| MD5 |
ac7ac0e0be8b14034d0586c218e12a86
|
|
| BLAKE2b-256 |
fb7c9db2677d14388f0a857bba514ba6450531e5f236bc78b254a7befbc589a3
|