Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Switch from TradingData to CoreAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyvega committed Aug 31, 2021
1 parent faa8b82 commit 12dd52a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions grpc/examples/python/submit-order.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

# __create_wallet:
# Vega node: Create client for accessing public data
datacli = vac.VegaTradingDataClient(node_url_grpc)
coreapicli = vac.VegaCoreAPIClient(node_url_grpc)

# Vega node: Create client for trading (e.g. submitting orders)
tradingcli = vac.VegaTradingClient(node_url_grpc)
Expand All @@ -79,7 +79,8 @@

# __get_market:
# Get a list of markets
markets = datacli.Markets(vac.api.trading.MarketsRequest()).markets
req = vac.coreapi.v1.coreapi.ListMarketsRequest()
markets = coreapicli.ListMarkets(req).markets
# Choose the first.
marketID = markets[0].id
# :get_market__
Expand Down

0 comments on commit 12dd52a

Please sign in to comment.