added limit checker
This commit is contained in:
parent
0e750840b8
commit
a01f57e1f9
14
tools/get_limits.py
Normal file
14
tools/get_limits.py
Normal file
@ -0,0 +1,14 @@
|
||||
import tinkoff_grpc
|
||||
import market_trade.constants
|
||||
import tinkoff_grpc.src.users
|
||||
|
||||
if __name__ == '__main__':
|
||||
api_address = market_trade.constants.TINKOFF_API_ADDRESS
|
||||
token = market_trade.constants.TINKOFF_BEARER_TOKEN
|
||||
authorization_field = market_trade.constants.TINKOFF_AUTHORIZATION_HEADER
|
||||
with tinkoff_grpc.Channel(api_address=api_address,
|
||||
token=token,
|
||||
authorization_field=authorization_field) as tinkoff_channel:
|
||||
user_service = tinkoff_grpc.src.users.UserService(tinkoff_channel)
|
||||
limits = user_service.get_tariff()
|
||||
print(limits)
|
||||
Loading…
x
Reference in New Issue
Block a user