diff --git a/docs/index.md b/docs/index.md index 6a2eaa98..e14ede1a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -47,8 +47,8 @@ wallet = Wallet(kp) connection = AsyncClient(config.default_http) provider = Provider(connection, wallet) -drfit_client = DriftClient.from_config(config, provider) -drift_user = User(clearing_house) +drift_client = DriftClient.from_config(config, provider) +drift_user = User(drift_client) # open a 10 SOL long position sig = await drift_client.open_position( @@ -68,12 +68,12 @@ leverage = await drift_user.get_leverage() print('current leverage:', leverage / 10_000) # you can also inspect other accounts information using the (authority=) flag -bigz_acc = ser(clearing_house, authority=PublicKey('bigZ')) +bigz_acc = User(drift_client, authority=PublicKey('bigZ')) leverage = await bigz_acc.get_leverage() print('bigZs leverage:', leverage / 10_000) # clearing house user calls can be expensive on the rpc so we can cache them -drift_user = User(clearing_house, use_cache=True) +drift_user = User(drift_client, use_cache=True) await drift_user.set_cache() # works without any rpc calls (uses the cached data)