From a166b3897c7a0f35c1e95208150131aaebca2e80 Mon Sep 17 00:00:00 2001 From: Devin Moss Date: Wed, 18 Sep 2024 12:04:31 -0500 Subject: [PATCH] README corrections --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e5dd59f..9c7b75c 100644 --- a/README.md +++ b/README.md @@ -9,9 +9,9 @@ yarn: ## Quickstart ```js -import TastytradeApi from "@tastytrade/api" +import TastytradeClient from "@tastytrade/api" -const tastytradeApi = new TastytradeApi(baseUrl, accountStreamerUrl) +const tastytradeApi = new TastytradeClient({ baseUrl, accountStreamerUrl }) const loginResponse = await tastytradeApi.sessionService.login(usernameOrEmail, password) const accounts = await tastytradeApi.accountsAndCustomersService.getCustomerAccounts() const accountPositions = await tastytradeApi.balancesAndPositionsService.getPositionsList(accounts[0].account['account-number']) @@ -78,7 +78,7 @@ To subscribe to equities quotes, the `symbol` is just the ticker symbol, like `A ### Account Streamer ```js -import TastytradeApi from "@tastytrade/api" +import TastytradeClient from "@tastytrade/api" import _ from 'lodash' function handleStreamerMessage(json) { @@ -89,7 +89,7 @@ function handleStreamerStateChange(streamerState) { console.log('streamer state changed: ', streamerState) } -const tastytradeClient = new TastytradeApi(baseUlr, accountStreamerUrl) +const tastytradeClient = new TastytradeClient({ baseUrl, accountStreamerUrl }) const accountStreamer = tastytradeClient.accountStreamer const loginResponse = await tastytradeClient.sessionService.login(usernameOrEmail, password) const accounts = await tastytradeClient.accountsAndCustomersService.getCustomerAccounts()