コード例 #1
0
def api_client(token):
    host = 'https://api-invest.tinkoff.ru/openapi/'
    conf = Configuration(host=host)
    conf.access_token = token
    return OpenApi(ApiClient(configuration=conf))
コード例 #2
0
def sandbox_api_client(token):
    sandbox_host = 'https://api-invest.tinkoff.ru/openapi/sandbox/'
    conf = Configuration(host=sandbox_host)

    conf.access_token = token
    return SandboxOpenApi(ApiClient(configuration=conf))