Skip to content

Commit 05758e5

Browse files
author
Egot Sennov
committed
Add error handler decorator
1 parent 7e9d63b commit 05758e5

91 files changed

Lines changed: 406 additions & 260 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/all_candles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os
22
from datetime import timedelta
33

4-
from tinkoff.invest import CandleInterval, Client
5-
from tinkoff.invest.schemas import CandleSource
4+
from tinkoff.invest import Client
5+
from tinkoff.invest.grpc.marketdata import CandleInterval, CandleSource
66
from tinkoff.invest.utils import now
77

88
TOKEN = os.environ["INVEST_TOKEN"]

examples/async_all_candles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import os
33
from datetime import timedelta
44

5-
from tinkoff.invest import AsyncClient, CandleInterval
6-
from tinkoff.invest.schemas import CandleSource
5+
from tinkoff.invest import AsyncClient
6+
from tinkoff.invest.grpc.marketdata import CandleInterval, CandleSource
77
from tinkoff.invest.utils import now
88

99
TOKEN = os.environ["INVEST_TOKEN"]

examples/async_get_asset_reports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from datetime import timedelta
44

55
from tinkoff.invest import AsyncClient
6-
from tinkoff.invest.schemas import GetAssetReportsRequest
6+
from tinkoff.invest.grpc.instruments import GetAssetReportsRequest
77
from tinkoff.invest.utils import now
88

99
TOKEN = os.environ["INVEST_TOKEN"]

examples/async_get_assets.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
import os
33

44
from tinkoff.invest import AsyncClient
5-
from tinkoff.invest.schemas import AssetsRequest, InstrumentStatus, InstrumentType
5+
from tinkoff.invest.grpc.instruments import (
6+
AssetsRequest,
7+
InstrumentStatus,
8+
InstrumentType,
9+
)
610

711
TOKEN = os.environ["INVEST_TOKEN"]
812

examples/async_get_bond_events.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import asyncio
22
import os
33

4-
from tinkoff.invest import AsyncClient, InstrumentType
5-
from tinkoff.invest.schemas import EventType, GetBondEventsRequest
4+
from tinkoff.invest import AsyncClient
5+
from tinkoff.invest.grpc.instruments import GetBondEventsRequest, InstrumentType
66

77
TOKEN = os.environ["INVEST_TOKEN"]
88

@@ -18,7 +18,7 @@ async def main():
1818

1919
request = GetBondEventsRequest(
2020
instrument_id=bond.uid,
21-
type=EventType.EVENT_TYPE_CALL,
21+
type=GetBondEventsRequest.EventType.EVENT_TYPE_CALL,
2222
)
2323
print(await client.instruments.get_bond_events(request=request))
2424

examples/async_get_bonds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33

44
from tinkoff.invest import AsyncClient
5-
from tinkoff.invest.schemas import InstrumentExchangeType
5+
from tinkoff.invest.grpc.instruments import InstrumentExchangeType
66

77
TOKEN = os.environ["INVEST_TOKEN"]
88

examples/async_get_candles_with_limit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import asyncio
22
import os
33

4-
from tinkoff.invest import AsyncClient, CandleInterval
4+
from tinkoff.invest import AsyncClient
5+
from tinkoff.invest.grpc.marketdata import CandleInterval
56
from tinkoff.invest.utils import now
67

78
TOKEN = os.environ["INVEST_TOKEN"]

examples/async_get_consensus_forecasts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33

44
from tinkoff.invest import AsyncClient
5-
from tinkoff.invest.schemas import GetConsensusForecastsRequest, Page
5+
from tinkoff.invest.grpc.instruments import GetConsensusForecastsRequest, Page
66

77
TOKEN = os.environ["INVEST_TOKEN"]
88

examples/async_get_forecast_by.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os
33

44
from tinkoff.invest import AsyncClient
5-
from tinkoff.invest.schemas import GetForecastRequest
5+
from tinkoff.invest.grpc.instruments import GetForecastRequest
66

77
TOKEN = os.environ["INVEST_TOKEN"]
88

examples/async_get_insider_deals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77

88
from tinkoff.invest import AsyncClient
9-
from tinkoff.invest.schemas import GetInsiderDealsRequest
9+
from tinkoff.invest.grpc.instruments import GetInsiderDealsRequest
1010

1111
TOKEN = os.environ["INVEST_TOKEN"]
1212

0 commit comments

Comments
 (0)