### Install FinamTradeApiPy Source: https://github.com/dboyara/finamtradeapipy/blob/master/README.md Instructions for installing the FinamTradeApiPy library using pip or poetry. This is the first step to integrate with the Finam trading API. ```bash pip install finam-trade-api-py poetry add finam-trade-api ``` -------------------------------- ### Get JWT Token Source: https://github.com/dboyara/finamtradeapipy/blob/master/README.md Example demonstrating how to obtain a JWT token using the FinamTradeApiPy library. It shows initialization of the client with a TokenManager and setting the JWT token. ```python import os from finam_trade_api import Client from finam_trade_api import TokenManager async def main(): # Получение токена из переменных окружения token = os.getenv("TOKEN") # Инициализация клиента с менеджером токенов client = Client(TokenManager(token)) # Установка JWT-токена await client.access_tokens.set_jwt_token() # Получение деталей JWT-токена return await client.access_tokens.get_jwt_token_details() if __name__ == "__main__": import asyncio # Запуск асинхронного main print(asyncio.run(main())) ``` -------------------------------- ### Account Information and Transactions Source: https://github.com/dboyara/finamtradeapipy/blob/master/README.md Example showing how to retrieve account information, transactions, and trades using the FinamTradeApiPy library. It includes setting the JWT token and making API calls for account data. ```python import os from pprint import pprint from finam_trade_api import Client from finam_trade_api import TokenManager from finam_trade_api.account import GetTransactionsRequest, GetTradesRequest token = os.getenv("TOKEN") account_id = os.getenv("ACCOUNT_ID") async def main(): client = Client(TokenManager(token)) await client.access_tokens.set_jwt_token() # Получение информации об аккаунте pprint(await client.account.get_account_info(account_id)) # Получение списка транзакций pprint(await client.account.get_transactions(GetTransactionsRequest( account_id=account_id, start_time="2024-01-01T00:00:00Z", end_time="2025-03-15T00:00:00Z", limit=10, ))) # Получение списка сделок pprint(await client.account.get_trades(GetTradesRequest( account_id=account_id, start_time="2024-01-01T00:00:00Z", end_time="2025-03-15T00:00:00Z", ))) if __name__ == "__main__": import asyncio asyncio.run(main()) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.