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.10.tar.gz (37.2 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.10-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Vega API client-0.0.10.tar.gz
  • Upload date:
  • Size: 37.2 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.10.tar.gz
Algorithm Hash digest
SHA256 e82b90a179e3a679330bd2971571d472236186c0387ef94479fec3995adafa3b
MD5 849c5716b793ed146795e159d26d2536
BLAKE2b-256 99f01447bcc1e79cb6a03cd8211f7024c5bc2b9c9532871df39ff12bde94527d

See more details on using hashes here.

File details

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

File metadata

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

Hashes for Vega_API_client-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 873a710889da79c8a530b7e6ce54bcf847def74ab14e91b7cf75c10234ac8be3
MD5 a166cded9a052e6d1aba2e9713460fc4
BLAKE2b-256 323383fd0d97a415ecb51195bb0411829c38e3c76e985cc2d1622a1fb59863f9

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