Skip to main content

Vega API client for gRPC and REST

Project description

Vega API client

Python tests

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 details)

Uploaded Source

Built Distribution

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

Vega_API_client-0.0.11-py3-none-any.whl (44.8 kB view details)

Uploaded Python 3

File details

Details for the file Vega API client-0.0.11.tar.gz.

File metadata

  • Download URL: Vega API client-0.0.11.tar.gz
  • Upload date:
  • Size: 36.3 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

Hashes for Vega API client-0.0.11.tar.gz
Algorithm Hash digest
SHA256 e7d0938cfe6a74cb99b21d00f7db1547f57195d09fb22d0fbe8152b6e08467a6
MD5 98451696d490e059ff50a0e727b23723
BLAKE2b-256 28356dacbc832fb3edc03557436aab053bb052efe5d29bd5872b4f6fa5ae58f3

See more details on using hashes here.

File details

Details for the file Vega_API_client-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: Vega_API_client-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 44.8 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

Hashes for Vega_API_client-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 52ed543518e46fefc707b21e0bd185ceadd39092a20202d987dec5d826b488f5
MD5 b5840c2ca6503bea48c0ce362a8d57db
BLAKE2b-256 3c7036bb20a6b01148238b7d1858ebbd8db09a3c776ce86feb9bc46a6a0f9a3b

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