diff --git a/poetry.lock b/poetry.lock index 5168a03..4d6b299 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1800,6 +1800,18 @@ click = ">=8.2.1" rich = ">=12.3.0" shellingham = ">=1.3.0" +[[package]] +name = "types-pyyaml" +version = "6.0.12.20260518" +description = "Typing stubs for PyYAML" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "types_pyyaml-6.0.12.20260518-py3-none-any.whl", hash = "sha256:d2150f75a231c9fe9c7463bd29487d93e60bac90400287351384bc2284eba7cd"}, + {file = "types_pyyaml-6.0.12.20260518.tar.gz", hash = "sha256:d917f83fb38462550338c1297faedd860b3ec83912b96b1e3d73255f7473e466"}, +] + [[package]] name = "typing-extensions" version = "4.15.0" @@ -2114,4 +2126,4 @@ propcache = ">=0.2.1" [metadata] lock-version = "2.1" python-versions = ">=3.10,<4.0.0" -content-hash = "67ddd4db11598d62a41f66646c5fbe07021333dfd51207ed7cd2de5cc575e637" +content-hash = "0411654616086af53ddddf524421d18f38b707669c93d1f5fb85a0b2cd9007cc" diff --git a/pyproject.toml b/pyproject.toml index 19e3cbb..7e24c32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,7 @@ pytest-coverage = "^0.0" pytest-mock = "^3.3.0" faker = "^4.14.0" pytest-recording = "^0.13.4" +types-pyyaml = "^6.0.12.20260518" [tool.isort] diff --git a/stake/constant.py b/stake/constant.py index 540f8f2..5104a65 100644 --- a/stake/constant.py +++ b/stake/constant.py @@ -10,6 +10,7 @@ class NYSEUrl(BaseModel): """Contains all the visited stake urls for the NYSE.""" STAKE_URL: str = "https://api2.prd.hellostake.com/" + STAKE_OVER_URL: str = "https://api.prd.hellostake.com/" account_balance: str = urljoin( STAKE_URL, "api/cma/getAccountBalance", allow_fragments=True ) @@ -47,7 +48,7 @@ class NYSEUrl(BaseModel): STAKE_URL, "api/purchaseorders/v2/quickBuy", allow_fragments=True ) quotes: str = urljoin( - STAKE_URL, "api/quotes/marketData/{symbols}", allow_fragments=True + STAKE_OVER_URL, "us/pricing/quotes/marketData", allow_fragments=True ) rate: str = urljoin(STAKE_URL, "api/wallet/rate", allow_fragments=True) ratings: str = urljoin( @@ -78,16 +79,18 @@ class NYSEUrl(BaseModel): users: str = urljoin(STAKE_URL, "api/user", allow_fragments=True) watchlists: str = urljoin( - STAKE_URL, "us/instrument/watchlists", allow_fragments=True + STAKE_OVER_URL, "us/instrument/watchlists", allow_fragments=True ) create_watchlist: str = urljoin( - STAKE_URL, "us/instrument/watchlist", allow_fragments=True + STAKE_OVER_URL, "us/instrument/watchlist", allow_fragments=True ) read_watchlist: str = urljoin( - STAKE_URL, "us/instrument/watchlist/{watchlist_id}", allow_fragments=True + STAKE_OVER_URL, "us/instrument/watchlist/{watchlist_id}", allow_fragments=True ) update_watchlist: str = urljoin( - STAKE_URL, "us/instrument/watchlist/{watchlist_id}/items", allow_fragments=True + STAKE_OVER_URL, + "us/instrument/watchlist/{watchlist_id}/items", + allow_fragments=True, ) statement: str = urljoin( diff --git a/stake/product.py b/stake/product.py index b6a5ab5..fd71563 100644 --- a/stake/product.py +++ b/stake/product.py @@ -12,7 +12,7 @@ from stake.ratings import Rating from stake.statement import Statement -__all__ = ["ProductSearchByName"] +__all__ = ["ProductSearchByName", "ProductQuote"] class ProductSearchByName(BaseModel): @@ -30,6 +30,27 @@ class Instrument(BaseModel): model_config = ConfigDict(alias_generator=camelcase) +class ProductQuote(BaseModel): + symbol: str + bid: Optional[float] = None + ask: Optional[float] = None + close: Optional[float] = None + close_bid: Optional[float] = None + close_ask: Optional[float] = None + last_trade: Optional[float] = None + pre_post_market_last_trade: Optional[float] = None + prior_close: Optional[float] = None + open: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + market_status: Optional[str] = None + trading_status: Optional[str] = None + stake_instrument_id: Optional[uuid.UUID] = None + trade_timestamp: Optional[datetime] = None + volume: Optional[int] = None + model_config = ConfigDict(alias_generator=camelcase) + + class Product(BaseModel): id: uuid.UUID instrument_type_id: Optional[str] = Field(None, alias="instrumentTypeID") @@ -56,6 +77,22 @@ class Product(BaseModel): trade_status: Optional[int] = None encoded_name: str period: str + bid: Optional[float] = None + ask: Optional[float] = None + close: Optional[float] = None + close_bid: Optional[float] = None + close_ask: Optional[float] = None + last_trade: Optional[float] = None + pre_post_market_last_trade: Optional[float] = None + prior_close: Optional[float] = None + open: Optional[float] = None + high: Optional[float] = None + low: Optional[float] = None + market_status: Optional[str] = None + trading_status: Optional[str] = None + stake_instrument_id: Optional[uuid.UUID] = None + trade_timestamp: Optional[datetime] = None + volume: Optional[int] = None inception_date: Optional[datetime] = None instrument_tags: List[Any] child_instruments: List[Instrument] @@ -84,6 +121,17 @@ async def statements(self, start_date: date | None = None) -> "List[Statement]": class ProductsClient(BaseClient): + async def quotes(self, symbols: List[str]) -> List[ProductQuote]: + """Return market quote data for US symbols.""" + data = await self._client.post( + self._client.exchange.quotes, {"symbols": symbols} + ) + return [ProductQuote.model_validate(quote) for quote in data] + + async def quote(self, symbol: str) -> Optional[ProductQuote]: + quotes = await self.quotes([symbol]) + return quotes[0] if quotes else None + async def get(self, symbol: str) -> Optional[Product]: """Given a symbol it will return the matching product. @@ -94,13 +142,22 @@ async def get(self, symbol: str) -> Optional[Product]: self._client.exchange.symbol.format(symbol=symbol) ) - return ( - Product.model_validate( - data["products"][0], context=dict(client=self._client) - ) - if data["products"] - else None - ) + if not data["products"]: + return None + + product_data = data["products"][0] + try: + quote = await self.quote(symbol) + except Exception: + quote = None + + if quote: + product_data = { + **product_data, + **quote.model_dump(by_alias=True, exclude_none=True), + } + + return Product.model_validate(product_data, context=dict(client=self._client)) async def search(self, request: ProductSearchByName) -> List[Instrument]: products = await self._client.get( diff --git a/tests/cassettes/test_equity/test_list_equities[exchange0].yaml b/tests/cassettes/test_equity/test_list_equities[exchange0].yaml index 522b0c3..fc57608 100644 --- a/tests/cassettes/test_equity/test_list_equities[exchange0].yaml +++ b/tests/cassettes/test_equity/test_list_equities[exchange0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,68 +28,20 @@ interactions: response: body: string: - '{"equityPositions": [{"unrealizedDayPLPercent": 1.0, "symbol": "AAPL", - "encodedName": "apple-inc-aapl", "unrealizedDayPL": "11.92", "instrumentID": - "a67422af-8504-43df-9e63-7361eb0bd99e", "openQty": "100", "priorClose": - "151", "avgPrice": "171.19", "side": "B", "costBasis": "1E+3", "mktPrice": - "153.04", "marketValue": "893.99", "unrealizedPL": 1.0, "availableForTradingQty": - "5.84152111", "name": "Apple, Inc.", "category": "Stock", "urlImage": "https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "bidPrice": null, "askPrice": null, "returnOnStock": null, "lastTrade": 153.04, - "dailyReturnValue": 2.04, "yearlyReturnValue": 50.3, "yearlyReturnPercentage": - 71.05, "period": "YEAR RETURN", "exchange": null}, {"unrealizedDayPLPercent": - 1.0, "symbol": "COP", "encodedName": "conocophillips-cop", "unrealizedDayPL": - "11.15", "instrumentID": "6b4f77d9-5617-4885-8377-ebc211d32bf7", "openQty": - "100", "priorClose": "88.48", "avgPrice": "116", "side": "B", "costBasis": "5.8E+2", - "mktPrice": "90.71", "marketValue": "453.55", "unrealizedPL": 1.0, "availableForTradingQty": - "5", "name": "ConocoPhillips", "category": "Stock", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/cop.png", - "bidPrice": null, "askPrice": null, "returnOnStock": null, "lastTrade": 90.71, - "dailyReturnValue": 2.23, "yearlyReturnValue": 26.11, "yearlyReturnPercentage": - 79.93, "period": "YEAR RETURN", "exchange": null}, {"unrealizedDayPLPercent": - 1.0, "symbol": "DVN", "encodedName": "devon-energy-corporation-dvn", "unrealizedDayPL": - "3.80", "instrumentID": "3962d255-47d5-4d7a-aeff-4fd1e2a324ed", "openQty": - "100", "priorClose": "57.21", "avgPrice": "61.77", "side": "B", "costBasis": - "5E+2", "mktPrice": "57.68", "marketValue": "466.91", "unrealizedPL": 1.0, - "availableForTradingQty": "8.09486805", "name": "Devon Energy Corporation", - "category": "Stock", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/dvn.png", - "bidPrice": null, "askPrice": null, "returnOnStock": null, "lastTrade": 57.68, - "dailyReturnValue": 0.47, "yearlyReturnValue": 15.36, "yearlyReturnPercentage": - 181.23, "period": "YEAR RETURN", "exchange": null}, {"unrealizedDayPLPercent": - 1.0, "symbol": "LIT", "encodedName": "global-x-lithium-battery-tech-etf-lit", - "unrealizedDayPL": "0.90", "instrumentID": "52b17dd1-07cf-494f-9487-e4a7a2e67c6a", - "openQty": "100", "priorClose": "72.01", "avgPrice": "78", "side": "B", "costBasis": - "7.8E+2", "mktPrice": "72.1", "marketValue": "721", "unrealizedPL": 1.0, "availableForTradingQty": - "10", "name": "Global X Lithium & Battery Tech ETF", "category": "ETF", "urlImage": - "https://drivewealth.imgix.net/symbols/lit.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "bidPrice": null, "askPrice": null, "returnOnStock": null, "lastTrade": 72.1, - "dailyReturnValue": 0.09, "yearlyReturnValue": 29.94, "yearlyReturnPercentage": - 116.84, "period": "YEAR RETURN", "exchange": null}, {"unrealizedDayPLPercent": - 1.0, "symbol": "MSFT", "encodedName": "microsoft-corporation-msft", "unrealizedDayPL": - "8.95", "instrumentID": "e234cc98-cd08-4b04-a388-fe5c822beea6", "openQty": - "100", "priorClose": "259.53", "avgPrice": "306.15", "side": "B", "costBasis": - "1E+3", "mktPrice": "262.27", "marketValue": "856.67", "unrealizedPL": 1.0, - "availableForTradingQty": "3.26637269", "name": "Microsoft Corporation", "category": - "Stock", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/msft.png", - "bidPrice": null, "askPrice": null, "returnOnStock": null, "lastTrade": 262.27, - "dailyReturnValue": 2.74, "yearlyReturnValue": 74.48, "yearlyReturnPercentage": - 46.75, "period": "YEAR RETURN", "exchange": null}, {"unrealizedDayPLPercent": - 1.0, "symbol": "MU", "encodedName": "micron-technology-inc-mu", "unrealizedDayPL": - "9.00", "instrumentID": "0baafbff-dcc6-4645-8d27-4b4baf8a37ac", "openQty": - "100", "priorClose": "62.4", "avgPrice": "89", "side": "B", "costBasis": - "8.9E+2", "mktPrice": "63.3", "marketValue": "633", "unrealizedPL": 1.0, "availableForTradingQty": - "10", "name": "Micron Technology Inc.", "category": "Stock", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/mu.png", - "bidPrice": null, "askPrice": null, "returnOnStock": null, "lastTrade": 63.3, - "dailyReturnValue": 0.9, "yearlyReturnValue": 41.44, "yearlyReturnPercentage": - 86.59, "period": "YEAR RETURN", "exchange": null}, {"unrealizedDayPLPercent": - 1.0, "symbol": "VPU", "encodedName": "utilities-vanguard-vpu", "unrealizedDayPL": - "-3.93", "instrumentID": "102ed336-3edf-414e-87fa-b004da9d5e73", "openQty": - "100", "priorClose": "151.01", "avgPrice": "154.56", "side": "B", "costBasis": - "3.1E+2", "mktPrice": "149.05", "marketValue": "298.95", "unrealizedPL": 1.0, - "availableForTradingQty": "2.00569358", "name": "Utilities Vanguard ", "category": - "ETF", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/vpu.png", - "bidPrice": null, "askPrice": null, "returnOnStock": null, "lastTrade": 149.05, - "dailyReturnValue": -1.96, "yearlyReturnValue": -0.97, "yearlyReturnPercentage": - -0.71, "period": "YEAR RETURN", "exchange": null}], "equityValue": 4324.07, - "pricesOnly": false, "pageNum": 0, "hasNext": false}' + '{"equityPositions":[{"unrealizedDayPLPercent":1.0,"symbol":"AAPL","encodedName":"apple-inc-aapl","unrealizedDayPL":"1.0","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","openQty":"100","priorClose":"151","avgPrice":"171.19","side":"B","costBasis":"1E+3","mktPrice":"153.04","marketValue":"893.99","unrealizedPL":1.0,"availableForTradingQty":"5.84152111","name":"Apple, + Inc.","category":"Stock","urlImage":"https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF","bidPrice":null,"askPrice":null,"returnOnStock":null,"lastTrade":153.04,"dailyReturnValue":2.04,"yearlyReturnValue":50.3,"yearlyReturnPercentage":71.05,"period":"YEAR + RETURN","exchange":null},{"unrealizedDayPLPercent":1.0,"symbol":"COP","encodedName":"conocophillips-cop","unrealizedDayPL":"1.0","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","openQty":"100","priorClose":"88.48","avgPrice":"116","side":"B","costBasis":"5.8E+2","mktPrice":"90.71","marketValue":"453.55","unrealizedPL":1.0,"availableForTradingQty":"5","name":"ConocoPhillips","category":"Stock","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/cop.png","bidPrice":null,"askPrice":null,"returnOnStock":null,"lastTrade":90.71,"dailyReturnValue":2.23,"yearlyReturnValue":26.11,"yearlyReturnPercentage":79.93,"period":"YEAR + RETURN","exchange":null},{"unrealizedDayPLPercent":1.0,"symbol":"DVN","encodedName":"devon-energy-corporation-dvn","unrealizedDayPL":"1.0","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","openQty":"100","priorClose":"57.21","avgPrice":"61.77","side":"B","costBasis":"5E+2","mktPrice":"57.68","marketValue":"466.91","unrealizedPL":1.0,"availableForTradingQty":"8.09486805","name":"Devon + Energy Corporation","category":"Stock","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/dvn.png","bidPrice":null,"askPrice":null,"returnOnStock":null,"lastTrade":57.68,"dailyReturnValue":0.47,"yearlyReturnValue":15.36,"yearlyReturnPercentage":181.23,"period":"YEAR + RETURN","exchange":null},{"unrealizedDayPLPercent":1.0,"symbol":"LIT","encodedName":"global-x-lithium-battery-tech-etf-lit","unrealizedDayPL":"1.0","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","openQty":"100","priorClose":"72.01","avgPrice":"78","side":"B","costBasis":"7.8E+2","mktPrice":"72.1","marketValue":"721","unrealizedPL":1.0,"availableForTradingQty":"10","name":"Global + X Lithium & Battery Tech ETF","category":"ETF","urlImage":"https://drivewealth.imgix.net/symbols/lit.png?fit=fillmax&w=125&h=125&bg=FFFFFF","bidPrice":null,"askPrice":null,"returnOnStock":null,"lastTrade":72.1,"dailyReturnValue":0.09,"yearlyReturnValue":29.94,"yearlyReturnPercentage":116.84,"period":"YEAR + RETURN","exchange":null},{"unrealizedDayPLPercent":1.0,"symbol":"MSFT","encodedName":"microsoft-corporation-msft","unrealizedDayPL":"1.0","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","openQty":"100","priorClose":"259.53","avgPrice":"306.15","side":"B","costBasis":"1E+3","mktPrice":"262.27","marketValue":"856.67","unrealizedPL":1.0,"availableForTradingQty":"3.26637269","name":"Microsoft + Corporation","category":"Stock","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/msft.png","bidPrice":null,"askPrice":null,"returnOnStock":null,"lastTrade":262.27,"dailyReturnValue":2.74,"yearlyReturnValue":74.48,"yearlyReturnPercentage":46.75,"period":"YEAR + RETURN","exchange":null},{"unrealizedDayPLPercent":1.0,"symbol":"MU","encodedName":"micron-technology-inc-mu","unrealizedDayPL":"1.0","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","openQty":"100","priorClose":"62.4","avgPrice":"89","side":"B","costBasis":"8.9E+2","mktPrice":"63.3","marketValue":"633","unrealizedPL":1.0,"availableForTradingQty":"10","name":"Micron + Technology Inc.","category":"Stock","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/mu.png","bidPrice":null,"askPrice":null,"returnOnStock":null,"lastTrade":63.3,"dailyReturnValue":0.9,"yearlyReturnValue":41.44,"yearlyReturnPercentage":86.59,"period":"YEAR + RETURN","exchange":null},{"unrealizedDayPLPercent":1.0,"symbol":"VPU","encodedName":"utilities-vanguard-vpu","unrealizedDayPL":"1.0","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","openQty":"100","priorClose":"151.01","avgPrice":"154.56","side":"B","costBasis":"3.1E+2","mktPrice":"149.05","marketValue":"298.95","unrealizedPL":1.0,"availableForTradingQty":"2.00569358","name":"Utilities + Vanguard ","category":"ETF","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/vpu.png","bidPrice":null,"askPrice":null,"returnOnStock":null,"lastTrade":149.05,"dailyReturnValue":-1.96,"yearlyReturnValue":-0.97,"yearlyReturnPercentage":-0.71,"period":"YEAR + RETURN","exchange":null}],"equityValue":4324.07,"pricesOnly":false,"pageNum":0,"hasNext":false}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_equity/test_list_equities[exchange1].yaml b/tests/cassettes/test_equity/test_list_equities[exchange1].yaml index b5a9a28..c0f872d 100644 --- a/tests/cassettes/test_equity/test_list_equities[exchange1].yaml +++ b/tests/cassettes/test_equity/test_list_equities[exchange1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,37 +28,13 @@ interactions: response: body: string: - '{"pageNum": 0, "hasNext": false, "equityPositions": [{"instrumentId": - "FUEL.XAU", "symbol": "FUEL", "name": "BETA GLOBAL ENERGY ETF UNITS", "openQty": - "100", "availableForTradingQty": "170", "averagePrice": "5.9400", "marketValue": - "953.7000", "mktPrice": "5.6100", "priorClose": "5.5900", "unrealizedDayPL": - "3.4000", "unrealizedDayPLPercent": 1.0, "unrealizedPL": 1.0, "unrealizedPLPercent": - "-5.56", "recentAnnouncement": false, "sensitive": false}, {"instrumentId": - "WDS.XAU", "symbol": "WDS", "name": "WOODSIDE ENERGY FPO", "openQty": "100", - "availableForTradingQty": "3", "averagePrice": "0", "marketValue": "93.4200", - "mktPrice": "31.1400", "priorClose": "32.5700", "unrealizedDayPL": "-4.2900", - "unrealizedDayPLPercent": 1.0, "unrealizedPL": 1.0, "unrealizedPLPercent": - "0", "recentAnnouncement": true, "sensitive": true}, {"instrumentId": "WTC.XAU", - "symbol": "WTC", "name": "WISETECH GLOBAL LTD FPO", "openQty": "100", "availableForTradingQty": - "10", "averagePrice": "51.5000", "marketValue": "491.8000", "mktPrice": "49.1800", - "priorClose": "47.4900", "unrealizedDayPL": "16.9000", "unrealizedDayPLPercent": - 1.0, "unrealizedPL": 1.0, "unrealizedPLPercent": "-4.50", "recentAnnouncement": - false, "sensitive": false}, {"instrumentId": "ALU.XAU", "symbol": "ALU", "name": - "ALTIUM LIMITED FPO", "openQty": "100", "availableForTradingQty": "20", "averagePrice": - "35.0000", "marketValue": "615.0000", "mktPrice": "30.7500", "priorClose": - "29.6800", "unrealizedDayPL": "21.4000", "unrealizedDayPLPercent": 1.0, "unrealizedPL": - 1.0, "unrealizedPLPercent": "-12.14", "recentAnnouncement": false, "sensitive": - false}, {"instrumentId": "BHP.XAU", "symbol": "BHP", "name": "BHP GROUP LIMITED - FPO", "openQty": "100", "availableForTradingQty": "20", "averagePrice": "50.8000", - "marketValue": "735.8000", "mktPrice": "36.7900", "priorClose": "37.1100", - "unrealizedDayPL": "-6.4000", "unrealizedDayPLPercent": 1.0, "unrealizedPL": - 1.0, "unrealizedPLPercent": "-27.58", "recentAnnouncement": false, "sensitive": - false}, {"instrumentId": "FOOD.XAU", "symbol": "FOOD", "name": "BETA GLOBAL - AGRI ETF UNITS", "openQty": "100", "availableForTradingQty": "100", "averagePrice": - "8.4700", "marketValue": "704.0000", "mktPrice": "7.0400", "priorClose": "7.0000", - "unrealizedDayPL": "4.0000", "unrealizedDayPLPercent": 1.0, "unrealizedPL": - 1.0, "unrealizedPLPercent": "-16.88", "recentAnnouncement": false, "sensitive": - false}]}' + '{"pageNum":0,"hasNext":false,"equityPositions":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"FUEL","name":"BETA + GLOBAL ENERGY ETF UNITS","openQty":"100","availableForTradingQty":"170","averagePrice":"5.9400","marketValue":"953.7000","mktPrice":"5.6100","priorClose":"5.5900","unrealizedDayPL":"1.0","unrealizedDayPLPercent":1.0,"unrealizedPL":1.0,"unrealizedPLPercent":"1.0","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"WDS","name":"WOODSIDE + ENERGY FPO","openQty":"100","availableForTradingQty":"3","averagePrice":"0","marketValue":"93.4200","mktPrice":"31.1400","priorClose":"32.5700","unrealizedDayPL":"1.0","unrealizedDayPLPercent":1.0,"unrealizedPL":1.0,"unrealizedPLPercent":"1.0","recentAnnouncement":true,"sensitive":true},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"WTC","name":"WISETECH + GLOBAL LTD FPO","openQty":"100","availableForTradingQty":"10","averagePrice":"51.5000","marketValue":"491.8000","mktPrice":"49.1800","priorClose":"47.4900","unrealizedDayPL":"1.0","unrealizedDayPLPercent":1.0,"unrealizedPL":1.0,"unrealizedPLPercent":"1.0","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"ALU","name":"ALTIUM + LIMITED FPO","openQty":"100","availableForTradingQty":"20","averagePrice":"35.0000","marketValue":"615.0000","mktPrice":"30.7500","priorClose":"29.6800","unrealizedDayPL":"1.0","unrealizedDayPLPercent":1.0,"unrealizedPL":1.0,"unrealizedPLPercent":"1.0","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"BHP","name":"BHP + GROUP LIMITED FPO","openQty":"100","availableForTradingQty":"20","averagePrice":"50.8000","marketValue":"735.8000","mktPrice":"36.7900","priorClose":"37.1100","unrealizedDayPL":"1.0","unrealizedDayPLPercent":1.0,"unrealizedPL":1.0,"unrealizedPLPercent":"1.0","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"FOOD","name":"BETA + GLOBAL AGRI ETF UNITS","openQty":"100","availableForTradingQty":"100","averagePrice":"8.4700","marketValue":"704.0000","mktPrice":"7.0400","priorClose":"7.0000","unrealizedDayPL":"1.0","unrealizedDayPLPercent":1.0,"unrealizedPL":1.0,"unrealizedPLPercent":"1.0","recentAnnouncement":false,"sensitive":false}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_funding/test_cash_available[exchange0].yaml b/tests/cassettes/test_funding/test_cash_available[exchange0].yaml index c015172..bb29a82 100644 --- a/tests/cassettes/test_funding/test_cash_available[exchange0].yaml +++ b/tests/cassettes/test_funding/test_cash_available[exchange0].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -43,12 +26,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/users/accounts/cashAvailableForWithdrawal response: body: - string: - '{"cashAvailableForWithdrawal": 1000, "cashAvailableForTrade": 800, - "cashBalance": 1000.0, "reservedCash": 0.0, "liquidCash": 1000.0, "dwCashAvailableForWithdrawal": - 1000, "pendingOrdersAmount": 0.0, "pendingWithdrawals": 0.0, "cardHoldAmount": - 0.0, "pendingPoliAmount": 0.0, "cashSettlement": [{"utcTime": "2025-07-10T13:30:00.001Z", - "cash": 0.0}, null, null]}' + string: '{"cashAvailableForWithdrawal":1000,"cashAvailableForTrade":800,"cashBalance":1000.0,"reservedCash":0.0,"liquidCash":1000.0,"dwCashAvailableForWithdrawal":1000,"pendingOrdersAmount":0.0,"pendingWithdrawals":0.0,"cardHoldAmount":0.0,"pendingPoliAmount":0.0,"cashSettlement":[{"utcTime":"2025-07-10T13:30:00.001Z","cash":0.0},null,null]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_funding/test_cash_available[exchange1].yaml b/tests/cassettes/test_funding/test_cash_available[exchange1].yaml index 9df6c99..7e66891 100644 --- a/tests/cassettes/test_funding/test_cash_available[exchange1].yaml +++ b/tests/cassettes/test_funding/test_cash_available[exchange1].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -43,12 +26,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/cash response: body: - string: - '{"settledCash": 10000.0, "postedBalance": 4000, "tradeSettlement": - 0.0, "buyingPower": 1000.0, "pendingBuys": 0.0, "pendingBids": 0.0, "settlementHold": - 0.0, "pendingWithdrawals": 0.0, "cashAvailableForWithdrawal": 1000, "cashAvailableForWithdrawalRaw": - 1000, "cashAvailableForTransfer": 1000, "cashAvailableForWithdrawalHold": - 0.0, "clearingCash": 0.0, "cashAvailableForExpressWithdrawal": 1000}' + string: '{"settledCash":10000.0,"postedBalance":4000,"tradeSettlement":0.0,"buyingPower":1000.0,"pendingBuys":0.0,"pendingBids":0.0,"settlementHold":0.0,"pendingWithdrawals":0.0,"cashAvailableForWithdrawal":1000,"cashAvailableForWithdrawalRaw":1000,"cashAvailableForTransfer":1000,"cashAvailableForWithdrawalHold":0.0,"clearingCash":0.0,"cashAvailableForExpressWithdrawal":1000}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_funding/test_funds_in_flight[exchange0].yaml b/tests/cassettes/test_funding/test_funds_in_flight[exchange0].yaml index 79719aa..125e310 100644 --- a/tests/cassettes/test_funding/test_funds_in_flight[exchange0].yaml +++ b/tests/cassettes/test_funding/test_funds_in_flight[exchange0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,7 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/fund/details response: body: - string: '{"fundsInFlight": []}' + string: '{"fundsInFlight":[]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_funding/test_funds_in_flight[exchange1].yaml b/tests/cassettes/test_funding/test_funds_in_flight[exchange1].yaml index d9f705f..c6d4c4d 100644 --- a/tests/cassettes/test_funding/test_funds_in_flight[exchange1].yaml +++ b/tests/cassettes/test_funding/test_funds_in_flight[exchange1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,7 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/transactions?status=PENDING&status=AWAITING_APPROVAL&size=100&page=0 response: body: - string: '{"items": [], "hasNext": false, "page": 0, "totalItems": 0}' + string: '{"items":[],"hasNext":false,"page":0,"totalItems":0}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_funding/test_list_fundings[exchange0-request_0].yaml b/tests/cassettes/test_funding/test_list_fundings[exchange0-request_0].yaml index e75e67c..4d9e52a 100644 --- a/tests/cassettes/test_funding/test_list_fundings[exchange0-request_0].yaml +++ b/tests/cassettes/test_funding/test_list_fundings[exchange0-request_0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,16 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/users/accounts/transactionHistory response: body: - string: '[{"transactionType": - "Funding", "finTranTypeID": "JNLC", "timestamp": "2021-09-30T15:45:50.425Z", - "tranAmount": 1000, "feeAmount": 0.0, "orderID": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "symbol": null, "side": "CREDIT", "text": "Deposit", "comment": "f1-9011914a", - "amountPerShare": 0.0, "taxRate": 0.0, "reference": "O9-7708124v", "referenceType": - "Funding"},{"transactionType": "Funding", "finTranTypeID": "JNLC", "timestamp": - "2021-08-10T15:45:02.683Z", "tranAmount": 1000, "feeAmount": 0.0, "orderID": - "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "symbol": null, "side": "CREDIT", - "text": "Deposit", "comment": "f1-9011914a", "amountPerShare": 0.0, "taxRate": - 0.0, "reference": "O9-7708124v", "referenceType": "Funding"}]' + string: '[{"transactionType":"Funding","finTranTypeID":"JNLC","timestamp":"2020-01-01T00:00:00.000Z","tranAmount":1000,"feeAmount":0.0,"orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":null,"side":"CREDIT","text":"Redacted","comment":"T1-0872999T","amountPerShare":0.0,"taxRate":0.0,"reference":"I0-1907220h","referenceType":"Funding"},{"transactionType":"Funding","finTranTypeID":"JNLC","timestamp":"2020-01-01T00:00:00.000Z","tranAmount":1000,"feeAmount":0.0,"orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":null,"side":"CREDIT","text":"Redacted","comment":"T1-0872999T","amountPerShare":0.0,"taxRate":0.0,"reference":"I0-1907220h","referenceType":"Funding"}]' headers: {} status: code: 200 @@ -68,21 +41,15 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/api/users/accounts/transactionDetails?reference=O9-7708124v&referenceType=Funding + uri: https://api2.prd.hellostake.com/api/users/accounts/transactionDetails?reference=I0-1907220h&referenceType=Funding response: body: - string: - '{"insertDate": 1628229668979, "channel": "Poli", "amountTo": 2196.01, - "amountFrom": 3000.0, "status": "RECONCILED", "speed": "Regular", "fxFee": - 20.39, "expressFee": 0.0, "channelFee": null, "totalFee": 20.39, "feesDisplayCurrency": - "USD", "spotRate": 0.7388, "reference": "O9-7708124v", "w8fee": 0.0, "currencyFrom": - "AUD", "currencyTo": "USD", "iof": null, "vet": null, "bsb": null, "accountNumber": - null, "transactionDetails": null}' + string: '{"insertDate":1574303699770,"channel":"Poli","amountTo":2196.01,"amountFrom":3000.0,"status":"RECONCILED","speed":"Regular","fxFee":20.39,"expressFee":0.0,"channelFee":null,"totalFee":20.39,"feesDisplayCurrency":"USD","spotRate":0.7388,"reference":"I0-1907220h","w8fee":0.0,"currencyFrom":"AUD","currencyTo":"USD","iof":null,"vet":null,"bsb":"h9-7975670P","accountNumber":"Z5-3001375g","transactionDetails":null}' headers: {} status: code: 200 message: OK - url: https://api2.prd.hellostake.com/api/users/accounts/transactionDetails?reference=O9-7708124v&referenceType=Funding + url: https://api2.prd.hellostake.com/api/users/accounts/transactionDetails?reference=I0-1907220h&referenceType=Funding - request: body: null headers: @@ -91,19 +58,13 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/api/users/accounts/transactionDetails?reference=O9-7708124v&referenceType=Funding + uri: https://api2.prd.hellostake.com/api/users/accounts/transactionDetails?reference=I0-1907220h&referenceType=Funding response: body: - string: - '{"insertDate": 1632879790963, "channel": "Poli", "amountTo": 3796.79, - "amountFrom": 5300.0, "status": "RECONCILED", "speed": "Regular", "fxFee": - 35.64, "expressFee": 0.0, "channelFee": null, "totalFee": 35.64, "feesDisplayCurrency": - "USD", "spotRate": 0.7231, "reference": "O9-7708124v", "w8fee": 0.0, "currencyFrom": - "AUD", "currencyTo": "USD", "iof": null, "vet": null, "bsb": null, "accountNumber": - null, "transactionDetails": null}' + string: '{"insertDate":1574303699770,"channel":"Poli","amountTo":3796.79,"amountFrom":5300.0,"status":"RECONCILED","speed":"Regular","fxFee":35.64,"expressFee":0.0,"channelFee":null,"totalFee":35.64,"feesDisplayCurrency":"USD","spotRate":0.7231,"reference":"I0-1907220h","w8fee":0.0,"currencyFrom":"AUD","currencyTo":"USD","iof":null,"vet":null,"bsb":"h9-7975670P","accountNumber":"Z5-3001375g","transactionDetails":null}' headers: {} status: code: 200 message: OK - url: https://api2.prd.hellostake.com/api/users/accounts/transactionDetails?reference=O9-7708124v&referenceType=Funding + url: https://api2.prd.hellostake.com/api/users/accounts/transactionDetails?reference=I0-1907220h&referenceType=Funding version: 1 diff --git a/tests/cassettes/test_funding/test_list_fundings[exchange1-request_1].yaml b/tests/cassettes/test_funding/test_list_fundings[exchange1-request_1].yaml index 77f9635..87b3cef 100644 --- a/tests/cassettes/test_funding/test_list_fundings[exchange1-request_1].yaml +++ b/tests/cassettes/test_funding/test_list_fundings[exchange1-request_1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,22 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/transactions?status=RECONCILED&size=3&page=0 response: body: - string: - '{"items": [{"id": "6fd4187a-559b-4326-b9bb-6fb6312ece7b", "side": "CREDIT", - "amount": 18.27, "currency": "AUD", "action": "DIVIDEND_DEPOSIT", "reference": - "O9-7708124v", "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", "status": - "RECONCILED", "approvedBy": null, "customerFee": 0.0, "insertedAt": "2022-07-18T07:32:28.836634", - "updatedAt": "2022-07-27T07:13:13.455605"}, {"id": "6fd4187a-559b-4326-b9bb-6fb6312ece7b", - "side": "DEBIT", "amount": 1148.28, "currency": "AUD", "action": "SETTLEMENT", - "reference": "O9-7708124v", "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "status": "RECONCILED", "approvedBy": null, "customerFee": 0.0, "insertedAt": - "2022-07-26T20:02:16.50554", "updatedAt": "2022-07-26T20:02:17.488227"}, {"id": - "6fd4187a-559b-4326-b9bb-6fb6312ece7b", "side": "CREDIT", "amount": 26.58, - "currency": "AUD", "action": "DIVIDEND_DEPOSIT", "reference": "O9-7708124v", - "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", "status": "RECONCILED", - "approvedBy": null, "customerFee": 0.0, "insertedAt": "2022-01-18T21:24:30.449019", - "updatedAt": "2022-07-14T02:59:09.799755"}], "hasNext": true, "page": 0, "totalItems": - 37}' + string: '{"items":[{"id":"6fd4187a-559b-4326-b9bb-6fb6312ece7b","side":"CREDIT","amount":18.27,"currency":"AUD","action":"DIVIDEND_DEPOSIT","reference":"I0-1907220h","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","status":"RECONCILED","approvedBy":null,"customerFee":0.0,"insertedAt":"2022-07-18T07:32:28.836634","updatedAt":"2022-07-27T07:13:13.455605"},{"id":"6fd4187a-559b-4326-b9bb-6fb6312ece7b","side":"DEBIT","amount":1148.28,"currency":"AUD","action":"SETTLEMENT","reference":"I0-1907220h","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","status":"RECONCILED","approvedBy":null,"customerFee":0.0,"insertedAt":"2022-07-26T20:02:16.50554","updatedAt":"2022-07-26T20:02:17.488227"},{"id":"6fd4187a-559b-4326-b9bb-6fb6312ece7b","side":"CREDIT","amount":26.58,"currency":"AUD","action":"DIVIDEND_DEPOSIT","reference":"I0-1907220h","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","status":"RECONCILED","approvedBy":null,"customerFee":0.0,"insertedAt":"2022-01-18T21:24:30.449019","updatedAt":"2022-07-14T02:59:09.799755"}],"hasNext":true,"page":0,"totalItems":37}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_fx/test_fx_conversion.yaml b/tests/cassettes/test_fx/test_fx_conversion.yaml index 5e06aee..6f1eac5 100644 --- a/tests/cassettes/test_fx/test_fx_conversion.yaml +++ b/tests/cassettes/test_fx/test_fx_conversion.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "rita19", "emailAddress": "torresbenjamin@gmail.com", "dw_AccountId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": "w4-1267174s", - "macAccountNumber": "H1-7641957H", "status": null, "macStatus": "BASIC_USER", - "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "lastName": "Alexander", "phoneNumber": "9011530005", - "signUpPhase": 0, "ackSignedWhen": "2021-05-18", "createdDate": 1574303699770, - "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "L7-2127933N", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "mfaenabled": false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","mfaenabled":false}' headers: {} status: code: 200 @@ -44,9 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/wallet/rate response: body: - string: - '{"fromCurrency": "USD", "toCurrency": "AUD", "fromAmount": 1000.0, - "toAmount": 1368.5, "rate": 1.3685, "quote": "7f730dad-86b0-44d7-8810-ed49af26b702"}' + string: '{"fromCurrency":"USD","toCurrency":"AUD","fromAmount":1000.0,"toAmount":800.0,"rate":1.3685,"quote":"7f730dad-86b0-44d7-8810-ed49af26b702"}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_market/test_check_market_status[exchange0].yaml b/tests/cassettes/test_market/test_check_market_status[exchange0].yaml index e1ce0ba..136dc92 100644 --- a/tests/cassettes/test_market/test_check_market_status[exchange0].yaml +++ b/tests/cassettes/test_market/test_check_market_status[exchange0].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -43,7 +26,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/utils/marketStatus response: body: - string: '{"response": {"status": {"current": "CLOSED"}}}' + string: '{"response":{"status":{"current":"CLOSED"}}}' headers: {} status: code: 202 diff --git a/tests/cassettes/test_market/test_check_market_status[exchange1].yaml b/tests/cassettes/test_market/test_check_market_status[exchange1].yaml index f979f2f..a0d8513 100644 --- a/tests/cassettes/test_market/test_check_market_status[exchange1].yaml +++ b/tests/cassettes/test_market/test_check_market_status[exchange1].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -43,12 +26,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/quoteTwo/ASX response: body: - string: - '[{"marketStatus": "CLOSED", "lastTradedExchange": "ASX", "symbol": - "ASX", "lastTradedTimestamp": 1752041427, "lastTrade": "71.1800", "bid": "71.0100", - "ask": "71.1800", "priorClose": "71.0100", "open": "70.8600", "high": "71.3000", - "low": "70.6800", "pointsChange": "0.1700", "percentageChange": "0.24", "outOfMarketPrice": - null, "outOfMarketQuantity": null, "outOfMarketSurplus": null, "volume": 256565}]' + string: '[{"marketStatus":"CLOSED","lastTradedExchange":"ASX","symbol":"ASX","lastTradedTimestamp":1752041427,"lastTrade":"71.1800","bid":"71.0100","ask":"71.1800","priorClose":"71.0100","open":"70.8600","high":"71.3000","low":"70.6800","pointsChange":"0.1700","percentageChange":"0.24","outOfMarketPrice":null,"outOfMarketQuantity":null,"outOfMarketSurplus":null,"volume":256565}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_order/test_brokerage[exchange0].yaml b/tests/cassettes/test_order/test_brokerage[exchange0].yaml index 44012d1..10e351b 100644 --- a/tests/cassettes/test_order/test_brokerage[exchange0].yaml +++ b/tests/cassettes/test_order/test_brokerage[exchange0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,9 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/orders/brokerage?orderAmount=1.0 response: body: - string: - '{"brokerageFee": 3, "fixedFee": 3, "variableFeePercentage": 0.01, - "variableLimit": 30000}' + string: '{"brokerageFee":3,"fixedFee":3,"variableFeePercentage":0.01,"variableLimit":30000}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_order/test_brokerage[exchange1].yaml b/tests/cassettes/test_order/test_brokerage[exchange1].yaml index 70a540f..b16e353 100644 --- a/tests/cassettes/test_order/test_brokerage[exchange1].yaml +++ b/tests/cassettes/test_order/test_brokerage[exchange1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,9 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders/brokerage?orderAmount=1.0 response: body: - string: - '{"brokerageFee": 3.00, "brokerageDiscount": 0.00, "fixedFee": 3.00, - "variableFeePercentage": 0.01, "variableLimit": 30000}' + string: '{"brokerageFee":3.0,"brokerageDiscount":0.0,"fixedFee":3.0,"variableFeePercentage":0.01,"variableLimit":30000}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_order/test_cancel_order[exchange0].yaml b/tests/cassettes/test_order/test_cancel_order[exchange0].yaml index 41fd612..c5a47ca 100644 --- a/tests/cassettes/test_order/test_cancel_order[exchange0].yaml +++ b/tests/cassettes/test_order/test_cancel_order[exchange0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,14 +28,9 @@ interactions: response: body: string: - '[{"orderNo": "x5-4334954E", "orderID": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderCashAmt": 100.0, "symbol": "AAPL", "price": 0.0, "stopPrice": 0.0, "side": - "B", "orderType": 1, "cumQty": "0.0", "limitPrice": 0.0, "commission": 0.0, - "createdWhen": "2021-07-04 21:46:25", "orderStatus": 0, "orderQty": 0.6541078, - "description": "Market Order", "instrumentID": "a67422af-8504-43df-9e63-7361eb0bd99e", - "imageUrl": "https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "instrumentSymbol": "AAPL", "instrumentName": "Apple, Inc.", "encodedName": - "apple-inc-aapl", "expires": "2022-07-27"}]' + '[{"orderNo":"Z5-3001375g","orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderCashAmt":100.0,"symbol":"AAPL","price":0.0,"stopPrice":0.0,"side":"B","orderType":1,"cumQty":"0","limitPrice":0.0,"commission":0.0,"createdWhen":"2022-02-15 + 04:31:52","orderStatus":0,"orderQty":0.6541078,"description":"Market Order","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF","instrumentSymbol":"AAPL","instrumentName":"Apple, + Inc.","encodedName":"apple-inc-aapl","expires":"2022-07-27"}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_order/test_cancel_order[exchange1].yaml b/tests/cassettes/test_order/test_cancel_order[exchange1].yaml index 86dd47a..c845e54 100644 --- a/tests/cassettes/test_order/test_cancel_order[exchange1].yaml +++ b/tests/cassettes/test_order/test_cancel_order[exchange1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,32 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '[{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": "FINCLEAR", - "brokerOrderId": null, "brokerOrderVersionId": null, "brokerInstructionId": - 4736823, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "OOO.XAU", "side": "BUY", "limitPrice": - 6.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-21T17:08:38.771843", "completedTimestamp": null, "expiresAt": "2022-08-22T00:00:00", - "orderStatus": "STAKE_PENDING_CREATE", "orderCompletionType": null, "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 221, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}, {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "broker": "FINCLEAR", "brokerOrderId": null, "brokerOrderVersionId": null, - "brokerInstructionId": 4737001, "brokerInstructionVersionId": 2, "userId": - "7c9bbfae-0000-47b7-0000-0e66d868c2cf", "instrumentId": null, "instrumentCode": - "WDS.XAU", "side": "SELL", "limitPrice": 36.0, "validity": "GTC", "validityDate": - null, "type": "LIMIT", "placedTimestamp": "2022-07-21T20:38:11.216447", "completedTimestamp": - null, "expiresAt": "2022-08-22T00:00:00", "orderStatus": "STAKE_PENDING_CREATE", - "orderCompletionType": null, "filledUnits": 0, "averagePrice": null, "unitsRemaining": - 3, "estimatedBrokerage": 0.0, "estimatedExchangeFees": 0.0}, {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "broker": "FINCLEAR", "brokerOrderId": null, "brokerOrderVersionId": null, - "brokerInstructionId": 4736992, "brokerInstructionVersionId": 2, "userId": - "7c9bbfae-0000-47b7-0000-0e66d868c2cf", "instrumentId": null, "instrumentCode": - "COL.XAU", "side": "BUY", "limitPrice": 27.0, "validity": "GTC", "validityDate": - null, "type": "LIMIT", "placedTimestamp": "2022-07-21T20:30:04.900918", "completedTimestamp": - null, "expiresAt": "2022-08-22T00:00:00", "orderStatus": "STAKE_PENDING_CREATE", - "orderCompletionType": null, "filledUnits": 0, "averagePrice": null, "unitsRemaining": - 10, "estimatedBrokerage": 0.0, "estimatedExchangeFees": 0.0}]' + string: '[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"OOO.XAU","side":"BUY","limitPrice":6.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-21T17:08:38.771843","completedTimestamp":null,"expiresAt":"2022-08-22T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":221,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0},{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"WDS.XAU","side":"SELL","limitPrice":36.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-21T20:38:11.216447","completedTimestamp":null,"expiresAt":"2022-08-22T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":3,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0},{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"BUY","limitPrice":27.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-21T20:30:04.900918","completedTimestamp":null,"expiresAt":"2022-08-22T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":10,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}]' headers: {} status: code: 200 @@ -87,21 +44,12 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders/1cf93550-8eb4-4c32-a229-826cf8c1be59/cancel response: body: - string: - '{"order": {"id": "8e419449-95cb-4b45-a92b-4791612e6e25", "broker": - "FINCLEAR", "brokerOrderId": null, "brokerOrderVersionId": null, "brokerInstructionId": - 4736823, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "OOO.XAU", "side": "BUY", "limitPrice": - 6.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-21T17:08:38.771843", "completedTimestamp": null, "expiresAt": "2022-08-22T00:00:00", - "orderStatus": "CLOSED", "orderCompletionType": "CANCELLED", "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 221, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"8e419449-95cb-4b45-a92b-4791612e6e25","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"OOO.XAU","side":"BUY","limitPrice":6.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-21T17:08:38.771843","completedTimestamp":null,"expiresAt":"2022-08-22T00:00:00","orderStatus":"CLOSED","orderCompletionType":"CANCELLED","filledUnits":0,"averagePrice":null,"unitsRemaining":221,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 message: OK - url: https://api2.prd.hellostake.com/api/asx/orders/76e8101a-f70d-4b7d-85eb-6cb400cd6509/cancel + url: https://api2.prd.hellostake.com/api/asx/orders/1cf93550-8eb4-4c32-a229-826cf8c1be59/cancel - request: body: null headers: @@ -113,24 +61,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '[{"id": "24f071f0-6ecb-44a1-a90e-0b7a1d97b134", "broker": "FINCLEAR", - "brokerOrderId": null, "brokerOrderVersionId": null, "brokerInstructionId": - 4737001, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "WDS.XAU", "side": "SELL", "limitPrice": - 36.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-21T20:38:11.216447", "completedTimestamp": null, "expiresAt": "2022-08-22T00:00:00", - "orderStatus": "STAKE_PENDING_CREATE", "orderCompletionType": null, "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 3, "estimatedBrokerage": 0.0, "estimatedExchangeFees": - 0.0}, {"id": "24f071f0-6ecb-44a1-a90e-0b7a1d97b134", "broker": "FINCLEAR", - "brokerOrderId": null, "brokerOrderVersionId": null, "brokerInstructionId": - 4736992, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "BUY", "limitPrice": - 27.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-21T20:30:04.900918", "completedTimestamp": null, "expiresAt": "2022-08-22T00:00:00", - "orderStatus": "STAKE_PENDING_CREATE", "orderCompletionType": null, "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 10, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}]' + string: '[{"id":"24f071f0-6ecb-44a1-a90e-0b7a1d97b134","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"WDS.XAU","side":"SELL","limitPrice":36.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-21T20:38:11.216447","completedTimestamp":null,"expiresAt":"2022-08-22T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":3,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0},{"id":"24f071f0-6ecb-44a1-a90e-0b7a1d97b134","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"BUY","limitPrice":27.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-21T20:30:04.900918","completedTimestamp":null,"expiresAt":"2022-08-22T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":10,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_order/test_list_orders[exchange0].yaml b/tests/cassettes/test_order/test_list_orders[exchange0].yaml index c57aea6..43f62ea 100644 --- a/tests/cassettes/test_order/test_list_orders[exchange0].yaml +++ b/tests/cassettes/test_order/test_list_orders[exchange0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,14 +28,10 @@ interactions: response: body: string: - '[{"orderNo": "L4-2572575L", "orderID": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderCashAmt": 0.0, "symbol": "TQQQ", "price": 0.0, "stopPrice": 0.0, "side": - "B", "orderType": 2, "cumQty": "0.0", "limitPrice": 26.7, "commission": 0.0, - "createdWhen": "2020-05-16 04:29:32", "orderStatus": 0, "orderQty": 10.0, - "description": "Limit Order: Buy at a limit of $26.70", "instrumentID": "63698af7-e71e-4424-9ce7-d34b70fbe260", - "imageUrl": "https://drivewealth.imgix.net/symbols/tqqq.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "instrumentSymbol": "TQQQ", "instrumentName": "ProShares UltraPro QQQ ETF", - "encodedName": "proshares-ultrapro-qqq-etf-tqqq", "expires": "2022-07-21"}]' + '[{"orderNo":"Z5-3001375g","orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderCashAmt":0.0,"symbol":"TQQQ","price":0.0,"stopPrice":0.0,"side":"B","orderType":2,"cumQty":"0","limitPrice":26.7,"commission":0.0,"createdWhen":"2022-02-15 + 04:31:52","orderStatus":0,"orderQty":10.0,"description":"Limit Order: Buy + at a limit of $26.70","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/tqqq.png?fit=fillmax&w=125&h=125&bg=FFFFFF","instrumentSymbol":"TQQQ","instrumentName":"ProShares + UltraPro QQQ ETF","encodedName":"proshares-ultrapro-qqq-etf-tqqq","expires":"2022-07-21"}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_order/test_list_orders[exchange1].yaml b/tests/cassettes/test_order/test_list_orders[exchange1].yaml index 683afdb..fa9d616 100644 --- a/tests/cassettes/test_order/test_list_orders[exchange1].yaml +++ b/tests/cassettes/test_order/test_list_orders[exchange1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,16 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '[{"id": "20ce85f9-2d8d-49ae-8191-39f785c3d5d6", "broker": "FINCLEAR", - "brokerOrderId": null, "brokerOrderVersionId": null, "brokerInstructionId": - 4736823, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "OOO.XAU", "side": "BUY", "limitPrice": - 6.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-21T17:08:38.771843", "completedTimestamp": null, "expiresAt": "2022-08-22T00:00:00", - "orderStatus": "STAKE_PENDING_CREATE", "orderCompletionType": null, "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 221, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}]' + string: '[{"id":"20ce85f9-2d8d-49ae-8191-39f785c3d5d6","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"OOO.XAU","side":"BUY","limitPrice":6.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-21T17:08:38.771843","completedTimestamp":null,"expiresAt":"2022-08-22T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":221,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_product/test_asx_product_course_of_sales.yaml b/tests/cassettes/test_product/test_asx_product_course_of_sales.yaml index 9633aff..e43cfc0 100644 --- a/tests/cassettes/test_product/test_asx_product_course_of_sales.yaml +++ b/tests/cassettes/test_product/test_asx_product_course_of_sales.yaml @@ -10,7 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": null, "userProfile": {"residentialAddress": null, "postalAddress": null}, "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -26,7 +26,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/courseOfSales/ORG response: body: - string: '{"ticker":"ORG","totalVolume":4340689,"totalTrades":15192,"totalValue":52386677.84,"courseOfSales":[{"id":"1430712669","instrumentCodeId":"ORG.XAU","exchangeMarket":"ASX","price":12.07,"volume":126,"value":1520.82,"tradeTimeMillis":1771824891233,"cancelledTimeMillis":null,"buyOrderNumber":"8116826296338466744","sellOrderNumber":"8116826296338466744"},{"id":"156728782706","instrumentCodeId":"ORG.XAU","exchangeMarket":"CXA","price":12.07,"volume":4116,"value":49680.12,"tradeTimeMillis":1771824535706,"cancelledTimeMillis":null,"buyOrderNumber":null,"sellOrderNumber":null}]}' + string: '{"ticker":"ORG","totalVolume":4340689,"totalTrades":15192,"totalValue":52386677.84,"courseOfSales":[{"id":"1430712669","instrumentCodeId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","exchangeMarket":"ASX","price":12.07,"volume":126,"value":1520.82,"tradeTimeMillis":1771824891233,"cancelledTimeMillis":null,"buyOrderNumber":"Z5-3001375g","sellOrderNumber":"Z5-3001375g"},{"id":"156728782706","instrumentCodeId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","exchangeMarket":"CXA","price":12.07,"volume":4116,"value":49680.12,"tradeTimeMillis":1771824535706,"cancelledTimeMillis":null,"buyOrderNumber":"Z5-3001375g","sellOrderNumber":"Z5-3001375g"}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_product/test_asx_product_depth.yaml b/tests/cassettes/test_product/test_asx_product_depth.yaml index 88701fd..92dcf1c 100644 --- a/tests/cassettes/test_product/test_asx_product_depth.yaml +++ b/tests/cassettes/test_product/test_asx_product_depth.yaml @@ -10,7 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": null, "userProfile": {"residentialAddress": null, "postalAddress": null}, "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_product/test_find_products_by_name[exchange0].yaml b/tests/cassettes/test_product/test_find_products_by_name[exchange0].yaml index efad42b..d57debc 100644 --- a/tests/cassettes/test_product/test_find_products_by_name[exchange0].yaml +++ b/tests/cassettes/test_product/test_find_products_by_name[exchange0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,41 +28,17 @@ interactions: response: body: string: - '{"instruments": [{"name": "SKYWATER TECHNOLOGY INC", "symbol": "SKYT", - "encodedName": "skywater-technology-inc-skyt", "instrumentId": "01fdcf5b-6c6d-4928-a875-b4f9212ace3d", - "imageUrl": "https://drivewealth.imgix.net/symbols/dw_default_logo.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": null}, {"name": "WARRIOR TECHNOLOGIES ACQ-A", "symbol": "WARR", - "encodedName": "warrior-technologies-acqa-warr", "instrumentId": "03cb7f33-27fb-4ae7-a3f3-ed23be742aa3", - "imageUrl": "https://drivewealth.imgix.net/symbols/WARR.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": null}, {"name": "BlackRock Science & Technology Trust II", "symbol": - "BSTZ", "encodedName": "blackrock-science-technology-trust-ii-bstz", "instrumentId": - "04028ea9-6e66-4392-bfef-98a9a48cb9cc", "imageUrl": "https://drivewealth.imgix.net/symbols/bstz_1617916369.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": null}, {"name": "Axonics Modulation Technologies Inc", "symbol": - "AXNX", "encodedName": "axonics-modulation-technologies-inc-axnx", "instrumentId": - "05cb4946-46d7-4a49-adab-36d730beaee6", "imageUrl": "https://drivewealth.imgix.net/symbols/axnx.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": null}, {"name": "iRhythm Technologies, Inc.", "symbol": "IRTC", - "encodedName": "irhythm-technologies-inc-irtc", "instrumentId": "05f00a67-b822-4023-871a-1d6215a0eef6", - "imageUrl": "https://drivewealth.imgix.net/symbols/irtc.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": null}, {"name": "ASPEN TECHNOLOGY INC", "symbol": "AZPN", "encodedName": - "aspen-technology-inc-azpn", "instrumentId": "08b7f76d-fa40-44b0-951e-b77d1a9206e3", - "imageUrl": "https://drivewealth.imgix.net/symbols/azpn_1652797208.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": "NSQ"}, {"name": "FARO Technologies Inc.", "symbol": "FARO", "encodedName": - "faro-technologies-inc-faro", "instrumentId": "08c65f62-394e-442a-86c1-0ad93b3efe21", - "imageUrl": "https://drivewealth.imgix.net/symbols/faro.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": null}, {"name": "Shift Technologies, Inc.", "symbol": "SFT", "encodedName": - "shift-technologies-inc-sft", "instrumentId": "0951b489-3ca6-41dd-a813-5a97d32043ea", - "imageUrl": "https://drivewealth.imgix.net/symbols/sft_1610660958.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": null}, {"name": "Aquabounty Technologies Inc", "symbol": "AQB", - "encodedName": "aquabounty-technologies-inc-aqb", "instrumentId": "0a9ad06a-cbc3-4ae5-86da-8942452908d0", - "imageUrl": "https://drivewealth.imgix.net/symbols/aqb_1616442632.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": null}, {"name": "Micron Technology Inc.", "symbol": "MU", "encodedName": - "micron-technology-inc-mu", "instrumentId": "0baafbff-dcc6-4645-8d27-4b4baf8a37ac", - "imageUrl": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/mu.png", - "exchange": null}], "instrumentTags": [{"tagID": "448f6003-9af8-4f25-8f51-2cf924255f09", - "tagName": "Nanotechnology"}, {"tagID": "55832928-f3cb-4229-9d27-1baa5b25ec15", - "tagName": "Wearable Technology"}, {"tagID": "794e2f64-f33c-4ec7-918a-7ec5c7c998cf", - "tagName": "Technology"}, {"tagID": "e1cdd8d5-c9be-460b-ab56-934907c7d69d", - "tagName": "Biotechnology"}]}' + '{"instruments":[{"name":"SKYWATER TECHNOLOGY INC","symbol":"SKYT","encodedName":"skywater-technology-inc-skyt","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/dw_default_logo.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":null},{"name":"WARRIOR + TECHNOLOGIES ACQ-A","symbol":"WARR","encodedName":"warrior-technologies-acqa-warr","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/WARR.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":null},{"name":"BlackRock + Science & Technology Trust II","symbol":"BSTZ","encodedName":"blackrock-science-technology-trust-ii-bstz","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/bstz_1617916369.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":null},{"name":"Axonics + Modulation Technologies Inc","symbol":"AXNX","encodedName":"axonics-modulation-technologies-inc-axnx","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/axnx.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":null},{"name":"iRhythm + Technologies, Inc.","symbol":"IRTC","encodedName":"irhythm-technologies-inc-irtc","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/irtc.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":null},{"name":"ASPEN + TECHNOLOGY INC","symbol":"AZPN","encodedName":"aspen-technology-inc-azpn","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/azpn_1652797208.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":"NSQ"},{"name":"FARO + Technologies Inc.","symbol":"FARO","encodedName":"faro-technologies-inc-faro","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/faro.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":null},{"name":"Shift + Technologies, Inc.","symbol":"SFT","encodedName":"shift-technologies-inc-sft","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/sft_1610660958.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":null},{"name":"Aquabounty + Technologies Inc","symbol":"AQB","encodedName":"aquabounty-technologies-inc-aqb","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/aqb_1616442632.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":null},{"name":"Micron + Technology Inc.","symbol":"MU","encodedName":"micron-technology-inc-mu","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/mu.png","exchange":null}],"instrumentTags":[{"tagID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","tagName":"Nanotechnology"},{"tagID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","tagName":"Wearable + Technology"},{"tagID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","tagName":"Technology"},{"tagID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","tagName":"Biotechnology"}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_product/test_find_products_by_name[exchange1].yaml b/tests/cassettes/test_product/test_find_products_by_name[exchange1].yaml index bd7d9a9..f441216 100644 --- a/tests/cassettes/test_product/test_find_products_by_name[exchange1].yaml +++ b/tests/cassettes/test_product/test_find_products_by_name[exchange1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,35 +28,25 @@ interactions: response: body: string: - '{"instruments": [{"instrumentId": "AIM.XAU", "symbol": "AIM", "name": - "Ai-Media Technologies Limited", "type": "EQUITY", "recentAnnouncement": false, - "sensitive": false}, {"instrumentId": "CPV.XAU", "symbol": "CPV", "name": - "ClearVue Technologies Limited", "type": "EQUITY", "recentAnnouncement": false, - "sensitive": false}, {"instrumentId": "LCT.XAU", "symbol": "LCT", "name": - "Living Cell Technologies Limited", "type": "EQUITY", "recentAnnouncement": - false, "sensitive": false}, {"instrumentId": "VR1.XAU", "symbol": "VR1", "name": - "Vection Technologies Ltd", "type": "EQUITY", "recentAnnouncement": false, - "sensitive": false}, {"instrumentId": "FFT.XAU", "symbol": "FFT", "name": - "Future First Technologies Ltd", "type": "EQUITY", "recentAnnouncement": false, - "sensitive": false}, {"instrumentId": "VHT.XAU", "symbol": "VHT", "name": - "Volpara Health Technologies Limited", "type": "EQUITY", "recentAnnouncement": - false, "sensitive": false}, {"instrumentId": "VTI.XAU", "symbol": "VTI", "name": - "Visioneering Technologies Inc", "type": "EQUITY", "recentAnnouncement": true, - "sensitive": false}, {"instrumentId": "EGY.XAU", "symbol": "EGY", "name": - "Energy Technologies Limited", "type": "EQUITY", "recentAnnouncement": false, - "sensitive": false}, {"instrumentId": "RTE.XAU", "symbol": "RTE", "name": - "Retech Technology., Co Limited", "type": "EQUITY", "recentAnnouncement": - false, "sensitive": false}, {"instrumentId": "AGI.XAU", "symbol": "AGI", "name": - "Ainsworth Game Technology Limited", "type": "EQUITY", "recentAnnouncement": - true, "sensitive": false}], "instrumentTags": [{"tagName": "Information Technology", - "tagId": "45"}, {"tagName": "Pharmaceuticals, Biotechnology & Life Sciences", - "tagId": "3520"}, {"tagName": "Technology Hardware & Equipment", "tagId": - "4520"}, {"tagName": "Health Care Technology", "tagId": "351030"}, {"tagName": - "Biotechnology", "tagId": "352010"}, {"tagName": "Technology Hardware, Storage - & Peripherals", "tagId": "452020"}, {"tagName": "Health Care Technology", - "tagId": "35103010"}, {"tagName": "Biotechnology", "tagId": "35201010"}, {"tagName": - "Technology Hardware, Storage & Peripherals", "tagId": "45202030"}, {"tagName": - "Technology Distributors", "tagId": "45203030"}]}' + '{"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"AIM","name":"Ai-Media + Technologies Limited","type":"EQUITY","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"CPV","name":"ClearVue + Technologies Limited","type":"EQUITY","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"LCT","name":"Living + Cell Technologies Limited","type":"EQUITY","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"VR1","name":"Vection + Technologies Ltd","type":"EQUITY","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"FFT","name":"Future + First Technologies Ltd","type":"EQUITY","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"VHT","name":"Volpara + Health Technologies Limited","type":"EQUITY","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"VTI","name":"Visioneering + Technologies Inc","type":"EQUITY","recentAnnouncement":true,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"EGY","name":"Energy + Technologies Limited","type":"EQUITY","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"RTE","name":"Retech + Technology., Co Limited","type":"EQUITY","recentAnnouncement":false,"sensitive":false},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"AGI","name":"Ainsworth + Game Technology Limited","type":"EQUITY","recentAnnouncement":true,"sensitive":false}],"instrumentTags":[{"tagName":"Information + Technology","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Pharmaceuticals, + Biotechnology & Life Sciences","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Technology + Hardware & Equipment","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Health + Care Technology","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Biotechnology","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Technology + Hardware, Storage & Peripherals","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Health + Care Technology","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Biotechnology","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Technology + Hardware, Storage & Peripherals","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"tagName":"Technology + Distributors","tagId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_product/test_get_product[exchange0-symbols0].yaml b/tests/cassettes/test_product/test_get_product[exchange0-symbols0].yaml index ae75f78..449db22 100644 --- a/tests/cassettes/test_product/test_get_product[exchange0-symbols0].yaml +++ b/tests/cassettes/test_product/test_get_product[exchange0-symbols0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,28 +28,21 @@ interactions: response: body: string: - '{"products": [{"id": "82f68a8a-874d-472b-bbb2-8d4b62856476", "instrumentTypeID": - null, "symbol": "TSLA", "description": "Tesla, Inc. designs, develops, manufactures - and sells electric vehicles and designs, manufactures, installs and sells - solar energy generation and energy storage products. The Company''s segments - include automotive, and energy generation and storage. The automotive segment - includes the design, development, manufacturing, sales and leasing of electric - vehicles as well as sales of automotive regulatory credits. The energy generation - and storage segment include the design, manufacture, installation, sales and - leasing of solar energy generation and energy storage products, services related - to its products, and sales of solar energy system incentives. Its automotive - products include Model 3, Model Y, Model S and Model X. Model 3 is a four-door - sedan. Model Y is a sport utility vehicle (SUV) built on the Model 3 platform. - Model S is a four-door sedan. Model X is an SUV. Its energy storage products - include Powerwall and Powerpack.", "category": "Stock", "currencyID": "USD", - "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png", - "sector": "Consumer Cyclical", "name": "Tesla, Inc.", "dailyReturn": 6.64, - "dailyReturnPercentage": 0.9, "lastTraded": 743.23, "monthlyReturn": 0.0, - "yearlyReturnPercentage": 421.89, "yearlyReturnValue": 544.51, "popularity": - 17753.0, "watched": 74328, "news": 0, "bought": 446283, "viewed": 475700, - "productType": "Instrument", "exchange": null, "status": "ACTIVE", "type": - "EQUITY", "encodedName": "tesla-inc-tsla", "period": "YEAR RETURN", "inceptionDate": - 1277769600000, "instrumentTags": [], "childInstruments": []}]}' + '{"products":[{"id":"82f68a8a-874d-472b-bbb2-8d4b62856476","instrumentTypeID":null,"symbol":"TSLA","description":"Tesla, + Inc. designs, develops, manufactures and sells electric vehicles and designs, + manufactures, installs and sells solar energy generation and energy storage + products. The Company''s segments include automotive, and energy generation + and storage. The automotive segment includes the design, development, manufacturing, + sales and leasing of electric vehicles as well as sales of automotive regulatory + credits. The energy generation and storage segment include the design, manufacture, + installation, sales and leasing of solar energy generation and energy storage + products, services related to its products, and sales of solar energy system + incentives. Its automotive products include Model 3, Model Y, Model S and + Model X. Model 3 is a four-door sedan. Model Y is a sport utility vehicle + (SUV) built on the Model 3 platform. Model S is a four-door sedan. Model X + is an SUV. Its energy storage products include Powerwall and Powerpack.","category":"Stock","currencyID":"USD","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png","sector":"Consumer + Cyclical","name":"Tesla, Inc.","dailyReturn":6.64,"dailyReturnPercentage":0.9,"lastTraded":743.23,"monthlyReturn":0.0,"yearlyReturnPercentage":421.89,"yearlyReturnValue":544.51,"popularity":17753.0,"watched":74328,"news":0,"bought":446283,"viewed":475700,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"tesla-inc-tsla","period":"YEAR + RETURN","inceptionDate":1277769600000,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -85,28 +60,22 @@ interactions: response: body: string: - '{"products": [{"id": "51160e9a-c3ea-4cdd-8870-b449b0a973b5", "instrumentTypeID": - null, "symbol": "MSFT", "description": "Microsoft Corporation is a technology - company. The Company develops, licenses, and supports a range of software - products, services and devices. The Company''s segments include Productivity - and Business Processes, Intelligent Cloud and More Personal Computing. The - Company''s products include operating systems; cross-device productivity applications; - server applications; business solution applications; desktop and server management - tools; software development tools; video games, and training and certification - of computer system integrators and developers. It also designs, manufactures, - and sells devices, including personal computers (PCs), tablets, gaming and - entertainment consoles, phones, other intelligent devices, and related accessories, - that integrate with its cloud-based offerings. It offers an array of services, - including cloud-based solutions that provide customers with software, services, - platforms, and content, and it provides solution support and consulting services.", - "category": "Stock", "currencyID": "USD", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/msft.png", - "sector": "Technology", "name": "Microsoft Corporation", "dailyReturn": 2.6, - "dailyReturnPercentage": 1.0, "lastTraded": 262.13, "monthlyReturn": 0.0, - "yearlyReturnPercentage": 46.75, "yearlyReturnValue": 74.48, "popularity": - 1717.0, "watched": 35555, "news": 0, "bought": 94582, "viewed": 103800, "productType": - "Instrument", "exchange": null, "status": "ACTIVE", "type": "EQUITY", "encodedName": - "microsoft-corporation-msft", "period": "YEAR RETURN", "inceptionDate": 511056000000, - "instrumentTags": [], "childInstruments": []}]}' + '{"products":[{"id":"51160e9a-c3ea-4cdd-8870-b449b0a973b5","instrumentTypeID":null,"symbol":"MSFT","description":"Microsoft + Corporation is a technology company. The Company develops, licenses, and supports + a range of software products, services and devices. The Company''s segments + include Productivity and Business Processes, Intelligent Cloud and More Personal + Computing. The Company''s products include operating systems; cross-device + productivity applications; server applications; business solution applications; + desktop and server management tools; software development tools; video games, + and training and certification of computer system integrators and developers. + It also designs, manufactures, and sells devices, including personal computers + (PCs), tablets, gaming and entertainment consoles, phones, other intelligent + devices, and related accessories, that integrate with its cloud-based offerings. + It offers an array of services, including cloud-based solutions that provide + customers with software, services, platforms, and content, and it provides + solution support and consulting services.","category":"Stock","currencyID":"USD","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/msft.png","sector":"Technology","name":"Microsoft + Corporation","dailyReturn":2.6,"dailyReturnPercentage":1.0,"lastTraded":262.13,"monthlyReturn":0.0,"yearlyReturnPercentage":46.75,"yearlyReturnValue":74.48,"popularity":1717.0,"watched":35555,"news":0,"bought":94582,"viewed":103800,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"microsoft-corporation-msft","period":"YEAR + RETURN","inceptionDate":511056000000,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -124,28 +93,22 @@ interactions: response: body: string: - '{"products": [{"id": "96b28603-b755-4ba4-987c-30152c5a79f6", "instrumentTypeID": - null, "symbol": "GOOG", "description": "Alphabet Inc. is a holding company. - The Company''s businesses include Google Inc. (Google) and its Internet products, - such as Access, Calico, CapitalG, GV, Nest, Verily, Waymo and X. The Company''s - segments include Google and Other Bets. The Google segment includes its Internet - products, such as Search, Ads, Commerce, Maps, YouTube, Google Cloud, Android, - Chrome and Google Play, as well as its hardware initiatives. The Google segment - is engaged in advertising, sales of digital content, applications and cloud - offerings, and sales of hardware products. The Other Bets segment is engaged - in the sales of Internet and television services through Google Fiber, sales - of Nest products and services, and licensing and research and development - (R&D) services through Verily. It offers Google Assistant, which allows users - to type or talk with Google; Google Maps, which helps users navigate to a - store, and Google Photos, which helps users store and organize all of their - photos.", "category": "Stock", "currencyID": "USD", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/goog.png", - "sector": "Technology", "name": "Alphabet Inc. - Class C Shares", "dailyReturn": - 0.0, "dailyReturnPercentage": 0.0, "lastTraded": 114.62, "monthlyReturn": - 0.0, "yearlyReturnPercentage": 66.52, "yearlyReturnValue": 808.61, "popularity": - 1595.0, "watched": 15480, "news": 0, "bought": 23093, "viewed": 29100, "productType": - "Instrument", "exchange": null, "status": "ACTIVE", "type": "EQUITY", "encodedName": - "alphabet-inc-class-c-shares-goog", "period": "YEAR RETURN", "inceptionDate": - 1092873600000, "instrumentTags": [], "childInstruments": []}]}' + '{"products":[{"id":"96b28603-b755-4ba4-987c-30152c5a79f6","instrumentTypeID":null,"symbol":"GOOG","description":"Alphabet + Inc. is a holding company. The Company''s businesses include Google Inc. (Google) + and its Internet products, such as Access, Calico, CapitalG, GV, Nest, Verily, + Waymo and X. The Company''s segments include Google and Other Bets. The Google + segment includes its Internet products, such as Search, Ads, Commerce, Maps, + YouTube, Google Cloud, Android, Chrome and Google Play, as well as its hardware + initiatives. The Google segment is engaged in advertising, sales of digital + content, applications and cloud offerings, and sales of hardware products. + The Other Bets segment is engaged in the sales of Internet and television + services through Google Fiber, sales of Nest products and services, and licensing + and research and development (R&D) services through Verily. It offers Google + Assistant, which allows users to type or talk with Google; Google Maps, which + helps users navigate to a store, and Google Photos, which helps users store + and organize all of their photos.","category":"Stock","currencyID":"USD","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/goog.png","sector":"Technology","name":"Alphabet + Inc. - Class C Shares","dailyReturn":0.0,"dailyReturnPercentage":0.0,"lastTraded":114.62,"monthlyReturn":0.0,"yearlyReturnPercentage":66.52,"yearlyReturnValue":808.61,"popularity":1595.0,"watched":15480,"news":0,"bought":23093,"viewed":29100,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"alphabet-inc-class-c-shares-goog","period":"YEAR + RETURN","inceptionDate":1092873600000,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_product/test_get_product[exchange1-symbols1].yaml b/tests/cassettes/test_product/test_get_product[exchange1-symbols1].yaml index 677dc36..51d18fe 100644 --- a/tests/cassettes/test_product/test_get_product[exchange1-symbols1].yaml +++ b/tests/cassettes/test_product/test_get_product[exchange1-symbols1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "leonardzachary", "emailAddress": "ellen70@bates-williams.com", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "R6-1813041A", "macAccountNumber": "K4-3517949y", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "middleName": null, "lastName": "Alexander", "phoneNumber": - "9011530005", "signUpPhase": 0, "ackSignedWhen": "2022-01-22", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "A1-2107594j", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,12 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/singleQuote/ANZ response: body: - string: - '{"marketStatus": "CLOSED", "lastTradedExchange": "ASX", "symbol": "ANZ", - "lastTradedTimestamp": 1658383848, "lastTrade": "21.9300", "bid": "21.9200", - "ask": "21.9300", "priorClose": "21.6400", "open": "22.3200", "high": "22.3400", - "low": "21.2700", "pointsChange": "0.2900", "percentageChange": "1.34", "outOfMarketPrice": - "21.9300", "outOfMarketQuantity": "3393713", "outOfMarketSurplus": "-69162"}' + string: '{"marketStatus":"CLOSED","lastTradedExchange":"ASX","symbol":"ANZ","lastTradedTimestamp":1658383848,"lastTrade":"21.9300","bid":"21.9200","ask":"21.9300","priorClose":"21.6400","open":"22.3200","high":"22.3400","low":"21.2700","pointsChange":"0.2900","percentageChange":"1.34","outOfMarketPrice":"21.9300","outOfMarketQuantity":"3393713","outOfMarketSurplus":"-69162"}' headers: {} status: code: 200 @@ -67,13 +44,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/singleQuote/WDS response: body: - string: - '{"marketStatus": "CLOSED", "lastTradedExchange": "ASX", "symbol": "WDS", - "lastTradedTimestamp": 1658383848, "lastTrade": "31.1400", "bid": "30.9600", - "ask": "30.9900", "priorClose": "32.5700", "open": "31.8400", "high": "32.1400", - "low": "30.7000", "pointsChange": "-1.5800", "percentageChange": "-4.39", - "outOfMarketPrice": "31.1400", "outOfMarketQuantity": "2070129", "outOfMarketSurplus": - "-16665"}' + string: '{"marketStatus":"CLOSED","lastTradedExchange":"ASX","symbol":"WDS","lastTradedTimestamp":1658383848,"lastTrade":"31.1400","bid":"30.9600","ask":"30.9900","priorClose":"32.5700","open":"31.8400","high":"32.1400","low":"30.7000","pointsChange":"-1.5800","percentageChange":"-4.39","outOfMarketPrice":"31.1400","outOfMarketQuantity":"2070129","outOfMarketSurplus":"-16665"}' headers: {} status: code: 200 @@ -90,12 +61,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/singleQuote/COL response: body: - string: - '{"marketStatus": "CLOSED", "lastTradedExchange": "ASX", "symbol": "COL", - "lastTradedTimestamp": 1658383850, "lastTrade": "18.8800", "bid": "18.8800", - "ask": "18.8900", "priorClose": "18.6300", "open": "18.7900", "high": "18.9700", - "low": "18.6400", "pointsChange": "0.2500", "percentageChange": "1.34", "outOfMarketPrice": - "18.8800", "outOfMarketQuantity": "1076585", "outOfMarketSurplus": "42836"}' + string: '{"marketStatus":"CLOSED","lastTradedExchange":"ASX","symbol":"COL","lastTradedTimestamp":1658383850,"lastTrade":"18.8800","bid":"18.8800","ask":"18.8900","priorClose":"18.6300","open":"18.7900","high":"18.9700","low":"18.6400","pointsChange":"0.2500","percentageChange":"1.34","outOfMarketPrice":"18.8800","outOfMarketQuantity":"1076585","outOfMarketSurplus":"42836"}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_product/test_search_products[exchange0-CBA].yaml b/tests/cassettes/test_product/test_search_products[exchange0-CBA].yaml index 1a8895e..59734bd 100644 --- a/tests/cassettes/test_product/test_search_products[exchange0-CBA].yaml +++ b/tests/cassettes/test_product/test_search_products[exchange0-CBA].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Instant", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Instant","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -44,31 +27,15 @@ interactions: response: body: string: - '{"instruments": [{"instrumentId": "CBA.XAU", "symbol": "CBA", "name": - "Commonwealth Bank of Australia", "type": "EQUITY", "recentAnnouncement": - false, "sensitive": false, "gfdOnly": false, "marketCap": "289.29B", "exchange": - null, "score": 0}, {"instrumentId": "CBAPI.XAU", "symbol": "CBAPI", "name": - "Commonwealth Bank of Australia", "type": "INTEREST_RATE", "recentAnnouncement": - false, "sensitive": false, "gfdOnly": false, "marketCap": "289.29B", "exchange": - null, "score": 2}, {"instrumentId": "CBAPJ.XAU", "symbol": "CBAPJ", "name": - "Commonwealth Bank of Australia", "type": "INTEREST_RATE", "recentAnnouncement": - false, "sensitive": false, "gfdOnly": false, "marketCap": "289.29B", "exchange": - null, "score": 2}, {"instrumentId": "CBAPK.XAU", "symbol": "CBAPK", "name": - "Commonwealth Bank of Australia", "type": "INTEREST_RATE", "recentAnnouncement": - false, "sensitive": false, "gfdOnly": false, "marketCap": "289.29B", "exchange": - null, "score": 2}, {"instrumentId": "CBAPL.XAU", "symbol": "CBAPL", "name": - "Commonwealth Bank of Australia", "type": "INTEREST_RATE", "recentAnnouncement": - false, "sensitive": false, "gfdOnly": false, "marketCap": "289.29B", "exchange": - null, "score": 2}, {"instrumentId": "CBAPM.XAU", "symbol": "CBAPM", "name": - "Commonwealth Bank of Australia", "type": "INTEREST_RATE", "recentAnnouncement": - false, "sensitive": false, "gfdOnly": false, "marketCap": "289.29B", "exchange": - null, "score": 2}, {"instrumentId": "CB8.XAU", "symbol": "CB8", "name": "CBA - Toress Basket [CB8]", "type": "EQUITY", "recentAnnouncement": false, "sensitive": - false, "gfdOnly": false, "marketCap": "289.29B", "exchange": null, "score": - 120}, {"instrumentId": "IHCB.XAU", "symbol": "IHCB", "name": "iShares Core - Global Corporate Bond (AUD Hedged) ETF", "type": "ETF", "recentAnnouncement": - false, "sensitive": false, "gfdOnly": false, "marketCap": "266M", "exchange": - null, "score": 122}], "instrumentTags": []}' + '{"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"CBA","name":"Commonwealth + Bank of Australia","type":"EQUITY","recentAnnouncement":false,"sensitive":false,"gfdOnly":false,"marketCap":"289.29B","exchange":null,"score":0},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"CBAPI","name":"Commonwealth + Bank of Australia","type":"INTEREST_RATE","recentAnnouncement":false,"sensitive":false,"gfdOnly":false,"marketCap":"289.29B","exchange":null,"score":2},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"CBAPJ","name":"Commonwealth + Bank of Australia","type":"INTEREST_RATE","recentAnnouncement":false,"sensitive":false,"gfdOnly":false,"marketCap":"289.29B","exchange":null,"score":2},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"CBAPK","name":"Commonwealth + Bank of Australia","type":"INTEREST_RATE","recentAnnouncement":false,"sensitive":false,"gfdOnly":false,"marketCap":"289.29B","exchange":null,"score":2},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"CBAPL","name":"Commonwealth + Bank of Australia","type":"INTEREST_RATE","recentAnnouncement":false,"sensitive":false,"gfdOnly":false,"marketCap":"289.29B","exchange":null,"score":2},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"CBAPM","name":"Commonwealth + Bank of Australia","type":"INTEREST_RATE","recentAnnouncement":false,"sensitive":false,"gfdOnly":false,"marketCap":"289.29B","exchange":null,"score":2},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"CB8","name":"CBA + Toress Basket [CB8]","type":"EQUITY","recentAnnouncement":false,"sensitive":false,"gfdOnly":false,"marketCap":"289.29B","exchange":null,"score":120},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","symbol":"IHCB","name":"iShares + Core Global Corporate Bond (AUD Hedged) ETF","type":"ETF","recentAnnouncement":false,"sensitive":false,"gfdOnly":false,"marketCap":"266M","exchange":null,"score":122}],"instrumentTags":[]}' headers: {} status: code: 200 @@ -84,13 +51,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/singleQuote/CBA response: body: - string: - '{"marketStatus": "CLOSED", "lastTradedExchange": "ASX", "symbol": "CBA", - "lastTradedTimestamp": 1775107195, "lastTrade": "172.8000", "bid": "172.8000", - "ask": "172.8100", "priorClose": "171.9000", "open": "171.7000", "high": "174.2200", - "low": "171.3500", "pointsChange": "0.9000", "percentageChange": "0.52", "outOfMarketPrice": - "172.8000", "outOfMarketQuantity": "784637", "outOfMarketSurplus": "187003", - "volume": 1927460}' + string: '{"marketStatus":"CLOSED","lastTradedExchange":"ASX","symbol":"CBA","lastTradedTimestamp":1775107195,"lastTrade":"172.8000","bid":"172.8000","ask":"172.8100","priorClose":"171.9000","open":"171.7000","high":"174.2200","low":"171.3500","pointsChange":"0.9000","percentageChange":"0.52","outOfMarketPrice":"172.8000","outOfMarketQuantity":"784637","outOfMarketSurplus":"187003","volume":1927460}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_product/test_search_products[exchange1-MSFT].yaml b/tests/cassettes/test_product/test_search_products[exchange1-MSFT].yaml index eeb98ae..9c5be91 100644 --- a/tests/cassettes/test_product/test_search_products[exchange1-MSFT].yaml +++ b/tests/cassettes/test_product/test_search_products[exchange1-MSFT].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Instant", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Instant","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -44,27 +27,12 @@ interactions: response: body: string: - '{"instruments": [{"name": "Microsoft Corporation", "symbol": "MSFT", - "encodedName": "microsoft-corporation-msft", "instrumentId": "e234cc98-cd08-4b04-a388-fe5c822beea6", - "stakeInstrumentId": "e3769c0b-456d-49dd-bec5-7a750c146d11", "imageUrl": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/msft.png", - "exchange": "NSQ"}, {"name": "DIREXION DAILY MSFT BEAR 1X", "symbol": "MSFD", - "encodedName": "direxion-daily-msft-bear-1x-msfd", "instrumentId": "001b5a31-32fb-401d-82b5-f2dc3ec98fae", - "stakeInstrumentId": "83bc732b-cc03-4baa-9451-00e21d6cd9ef", "imageUrl": "https://drivewealth.imgix.net/symbols/msfd_1666599112.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": "NMQ"}, {"name": "GraniteShares 2x Long MSFT Daily ETF", "symbol": - "MSFL", "encodedName": "graniteshares-2x-long-msft-daily-etf-msfl", "instrumentId": - "18998b7b-e440-48e5-8cc0-556d5ad5a991", "stakeInstrumentId": "d22172a0-fdf1-4aad-a796-8850c835023b", - "imageUrl": "https://drivewealth.imgix.net/symbols/msfl_1714794745.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": "NMQ"}, {"name": "ROUNDHILL MSFT WEEKLYPAY ETF", "symbol": "MSFW", - "encodedName": "roundhill-msft-weeklypay-etf-msfw", "instrumentId": "36001204-bb72-4db4-b0ba-9b9c602c9729", - "stakeInstrumentId": "5a04cb5e-28d9-4e0c-9fa2-0c1c83a8f221", "imageUrl": "https://drivewealth.imgix.net/symbols/msfw_1753257703.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": "BTQ"}, {"name": "YieldMax MSFT Option Income Strategy ETF", "symbol": - "MSFO", "encodedName": "yieldmax-msft-option-income-strategy-etf-msfo", "instrumentId": - "634c3949-de0a-467b-baa7-fb60c993ed19", "stakeInstrumentId": "645ee7ea-0434-4d96-a7af-d279f84de86d", - "imageUrl": "https://drivewealth.imgix.net/symbols/msfo_1697073212.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": "PCQ"}, {"name": "DIREXION DAILY MSFT BULL 1.5", "symbol": "MSFU", - "encodedName": "direxion-daily-msft-bull-15-msfu", "instrumentId": "838e1162-c850-484c-b3b9-3054749b5e39", - "stakeInstrumentId": "01e9d902-9593-495b-b7f5-6074c83940ca", "imageUrl": "https://drivewealth.imgix.net/symbols/msfu_1666599113.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "exchange": "NMQ"}], "instrumentTags": []}' + '{"instruments":[{"name":"Microsoft Corporation","symbol":"MSFT","encodedName":"microsoft-corporation-msft","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/msft.png","exchange":"NSQ"},{"name":"DIREXION + DAILY MSFT BEAR 1X","symbol":"MSFD","encodedName":"direxion-daily-msft-bear-1x-msfd","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/msfd_1666599112.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":"NMQ"},{"name":"GraniteShares + 2x Long MSFT Daily ETF","symbol":"MSFL","encodedName":"graniteshares-2x-long-msft-daily-etf-msfl","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/msfl_1714794745.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":"NMQ"},{"name":"ROUNDHILL + MSFT WEEKLYPAY ETF","symbol":"MSFW","encodedName":"roundhill-msft-weeklypay-etf-msfw","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/msfw_1753257703.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":"BTQ"},{"name":"YieldMax + MSFT Option Income Strategy ETF","symbol":"MSFO","encodedName":"yieldmax-msft-option-income-strategy-etf-msfo","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/msfo_1697073212.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":"PCQ"},{"name":"DIREXION + DAILY MSFT BULL 1.5","symbol":"MSFU","encodedName":"direxion-daily-msft-bull-15-msfu","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://drivewealth.imgix.net/symbols/msfu_1666599113.png?fit=fillmax&w=125&h=125&bg=FFFFFF","exchange":"NMQ"}],"instrumentTags":[]}' headers: {} status: code: 200 @@ -81,31 +49,22 @@ interactions: response: body: string: - '{"products": [{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "stakeInstrumentId": - "e3769c0b-456d-49dd-bec5-7a750c146d11", "instrumentTypeID": null, "symbol": - "MSFT", "description": "Microsoft Corporation is a technology company. The - Company develops, licenses, and supports a range of software products, services - and devices. The Company''s segments include Productivity and Business Processes, - Intelligent Cloud and More Personal Computing. The Company''s products include - operating systems; cross-device productivity applications; server applications; - business solution applications; desktop and server management tools; software - development tools; video games, and training and certification of computer - system integrators and developers. It also designs, manufactures, and sells - devices, including personal computers (PCs), tablets, gaming and entertainment - consoles, phones, other intelligent devices, and related accessories, that - integrate with its cloud-based offerings. It offers an array of services, - including cloud-based solutions that provide customers with software, services, - platforms, and content, and it provides solution support and consulting services.", - "category": "Stock", "currencyID": "USD", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/msft.png", - "sector": "Technology", "name": "Microsoft Corporation", "prePostMarketDailyReturn": - -0.06, "prePostMarketDailyReturnPercentage": -0.02, "dailyReturn": 4.09, "dailyReturnPercentage": - 1.11, "lastTraded": 373.46, "monthlyReturn": 0.0, "yearlyReturnPercentage": - 46.75, "yearlyReturnValue": 74.48, "popularity": 1717.0, "watched": 35555, - "news": 0, "bought": 157339, "viewed": 129200, "productType": "Instrument", - "exchange": "NSQ", "status": "ACTIVE", "type": "EQUITY", "encodedName": "microsoft-corporation-msft", - "period": "YEAR RETURN", "extendedHoursNotionalStatus": "ACTIVE", "inceptionDate": - 511056000000, "marketCap": 3162416042769, "instrumentTags": [], "childInstruments": - []}]}' + '{"products":[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentTypeID":null,"symbol":"MSFT","description":"Microsoft + Corporation is a technology company. The Company develops, licenses, and supports + a range of software products, services and devices. The Company''s segments + include Productivity and Business Processes, Intelligent Cloud and More Personal + Computing. The Company''s products include operating systems; cross-device + productivity applications; server applications; business solution applications; + desktop and server management tools; software development tools; video games, + and training and certification of computer system integrators and developers. + It also designs, manufactures, and sells devices, including personal computers + (PCs), tablets, gaming and entertainment consoles, phones, other intelligent + devices, and related accessories, that integrate with its cloud-based offerings. + It offers an array of services, including cloud-based solutions that provide + customers with software, services, platforms, and content, and it provides + solution support and consulting services.","category":"Stock","currencyID":"USD","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/msft.png","sector":"Technology","name":"Microsoft + Corporation","prePostMarketDailyReturn":-0.06,"prePostMarketDailyReturnPercentage":-0.02,"dailyReturn":4.09,"dailyReturnPercentage":1.11,"lastTraded":373.46,"monthlyReturn":0.0,"yearlyReturnPercentage":46.75,"yearlyReturnValue":74.48,"popularity":1717.0,"watched":35555,"news":0,"bought":157339,"viewed":129200,"productType":"Instrument","exchange":"NSQ","status":"ACTIVE","type":"EQUITY","encodedName":"microsoft-corporation-msft","period":"YEAR + RETURN","extendedHoursNotionalStatus":"ACTIVE","inceptionDate":511056000000,"marketCap":3162416042769,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_ratings/test_list_ratings.yaml b/tests/cassettes/test_ratings/test_list_ratings.yaml index b4e16b3..842d974 100644 --- a/tests/cassettes/test_ratings/test_list_ratings.yaml +++ b/tests/cassettes/test_ratings/test_list_ratings.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "rita19", "emailAddress": "torresbenjamin@gmail.com", "dw_AccountId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": "w4-1267174s", - "macAccountNumber": "H1-7641957H", "status": null, "macStatus": "BASIC_USER", - "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "lastName": "Alexander", "phoneNumber": "9011530005", - "signUpPhase": 0, "ackSignedWhen": "2021-05-18", "createdDate": 1574303699770, - "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "L7-2127933N", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "mfaenabled": false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","mfaenabled":false}' headers: {} status: code: 200 @@ -41,43 +24,22 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/api/data/calendar/ratings?tickers=AAPL,MSFT&pageSize=4 + uri: https://api2.prd.hellostake.com/api/data/calendar/ratings?tickers=AAPL%2CMSFT&pageSize=4 response: body: string: - '{"ratings": [{"id": "a154926a-4540-437c-aef4-c0de3671cfe6", "date": - "2022-01-14", "time": "07:04:52", "ticker": "AAPL", "exchange": "NASDAQ", - "name": "Apple", "analyst": "Loop Capital", "currency": "USD", "url": "https://www.benzinga.com/stock/AAPL/ratings", - "importance": 0, "notes": "", "updated": 1642161976, "action_pt": "Raises", - "action_company": "Maintains", "rating_current": "Buy", "pt_current": "210.0000", - "rating_prior": "", "pt_prior": "165.0000", "url_calendar": "https://www.benzinga.com/stock/AAPL/ratings", - "url_news": "https://www.benzinga.com/stock-articles/AAPL/analyst-ratings", - "analyst_name": "Ananda Baruah"}, {"id": "a154926a-4540-437c-aef4-c0de3671cfe6", - "date": "2021-12-22", "time": "09:51:07", "ticker": "AAPL", "exchange": "NASDAQ", - "name": "Apple", "analyst": "Citigroup", "currency": "USD", "url": "https://www.benzinga.com/stock/AAPL/ratings", - "importance": 0, "notes": "", "updated": 1640184748, "action_pt": "Raises", - "action_company": "Maintains", "rating_current": "Buy", "pt_current": "200.0000", - "rating_prior": "", "pt_prior": "170.0000", "url_calendar": "https://www.benzinga.com/stock/AAPL/ratings", - "url_news": "https://www.benzinga.com/stock-articles/AAPL/analyst-ratings", - "analyst_name": "Jim Suva"}, {"id": "a154926a-4540-437c-aef4-c0de3671cfe6", - "date": "2021-12-22", "time": "05:01:24", "ticker": "MSFT", "exchange": "NASDAQ", - "name": "Microsoft", "analyst": "SMBC Nikko", "currency": "USD", "url": "https://www.benzinga.com/stock/MSFT/ratings", - "importance": 0, "notes": "", "updated": 1640167354, "action_pt": "Announces", - "action_company": "Initiates Coverage On", "rating_current": "Outperform", - "pt_current": "410.0000", "rating_prior": "", "pt_prior": "", "url_calendar": - "https://www.benzinga.com/stock/MSFT/ratings", "url_news": "https://www.benzinga.com/stock-articles/MSFT/analyst-ratings", - "analyst_name": "Steve Koenig"}, {"id": "a154926a-4540-437c-aef4-c0de3671cfe6", - "date": "2021-12-14", "time": "08:12:14", "ticker": "AAPL", "exchange": "NASDAQ", - "name": "Apple", "analyst": "Evercore ISI Group", "currency": "USD", "url": - "https://www.benzinga.com/stock/AAPL/ratings", "importance": 0, "notes": "", - "updated": 1639487616, "action_pt": "Raises", "action_company": "Maintains", - "rating_current": "Outperform", "pt_current": "200.0000", "rating_prior": - "", "pt_prior": "180.0000", "url_calendar": "https://www.benzinga.com/stock/AAPL/ratings", - "url_news": "https://www.benzinga.com/stock-articles/AAPL/analyst-ratings", - "analyst_name": "Amit Daryanani"}]}' + '{"ratings":[{"id":"a154926a-4540-437c-aef4-c0de3671cfe6","date":"2022-01-14","time":"07:04:52","ticker":"AAPL","exchange":"NASDAQ","name":"Apple","analyst":"Loop + Capital","currency":"USD","url":"https://www.benzinga.com/stock/AAPL/ratings","importance":0,"notes":"","updated":1642161976,"action_pt":"Raises","action_company":"Maintains","rating_current":"Buy","pt_current":"210.0000","rating_prior":"","pt_prior":"165.0000","url_calendar":"https://www.benzinga.com/stock/AAPL/ratings","url_news":"https://www.benzinga.com/stock-articles/AAPL/analyst-ratings","analyst_name":"Ananda + Baruah"},{"id":"a154926a-4540-437c-aef4-c0de3671cfe6","date":"2021-12-22","time":"09:51:07","ticker":"AAPL","exchange":"NASDAQ","name":"Apple","analyst":"Citigroup","currency":"USD","url":"https://www.benzinga.com/stock/AAPL/ratings","importance":0,"notes":"","updated":1640184748,"action_pt":"Raises","action_company":"Maintains","rating_current":"Buy","pt_current":"200.0000","rating_prior":"","pt_prior":"170.0000","url_calendar":"https://www.benzinga.com/stock/AAPL/ratings","url_news":"https://www.benzinga.com/stock-articles/AAPL/analyst-ratings","analyst_name":"Jim + Suva"},{"id":"a154926a-4540-437c-aef4-c0de3671cfe6","date":"2021-12-22","time":"05:01:24","ticker":"MSFT","exchange":"NASDAQ","name":"Microsoft","analyst":"SMBC + Nikko","currency":"USD","url":"https://www.benzinga.com/stock/MSFT/ratings","importance":0,"notes":"","updated":1640167354,"action_pt":"Announces","action_company":"Initiates + Coverage On","rating_current":"Outperform","pt_current":"410.0000","rating_prior":"","pt_prior":"","url_calendar":"https://www.benzinga.com/stock/MSFT/ratings","url_news":"https://www.benzinga.com/stock-articles/MSFT/analyst-ratings","analyst_name":"Steve + Koenig"},{"id":"a154926a-4540-437c-aef4-c0de3671cfe6","date":"2021-12-14","time":"08:12:14","ticker":"AAPL","exchange":"NASDAQ","name":"Apple","analyst":"Evercore + ISI Group","currency":"USD","url":"https://www.benzinga.com/stock/AAPL/ratings","importance":0,"notes":"","updated":1639487616,"action_pt":"Raises","action_company":"Maintains","rating_current":"Outperform","pt_current":"200.0000","rating_prior":"","pt_prior":"180.0000","url_calendar":"https://www.benzinga.com/stock/AAPL/ratings","url_news":"https://www.benzinga.com/stock-articles/AAPL/analyst-ratings","analyst_name":"Amit + Daryanani"}]}' headers: {} status: code: 200 message: OK - url: https://api2.prd.hellostake.com/api/data/calendar/ratings?tickers=AAPL,MSFT&pageSize=4 + url: https://api2.prd.hellostake.com/api/data/calendar/ratings?tickers=AAPL%2CMSFT&pageSize=4 version: 1 diff --git a/tests/cassettes/test_ratings/test_list_ratings_unknown.yaml b/tests/cassettes/test_ratings/test_list_ratings_unknown.yaml index 3ae0e09..977d069 100644 --- a/tests/cassettes/test_ratings/test_list_ratings_unknown.yaml +++ b/tests/cassettes/test_ratings/test_list_ratings_unknown.yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,7 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/data/calendar/ratings?tickers=NOTEXIST&pageSize=4 response: body: - string: '{"message": "No data returned"}' + string: '{"message":"No data returned"}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_statement/test_list_statements.yaml b/tests/cassettes/test_statement/test_list_statements.yaml index b58eec6..2af7247 100644 --- a/tests/cassettes/test_statement/test_list_statements.yaml +++ b/tests/cassettes/test_statement/test_list_statements.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -43,653 +26,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/data/fundamentals/CVNA/statements?startDate=2022-01-01 response: body: - string: - '[{"date": "2025-03-31", "quarter": 1, "year": 2025, "statementData": - {"balanceSheet": [{"dataCode": "equity", "value": 1504000000.0}, {"dataCode": - "investmentsCurrent", "value": 1212000000.0}, {"dataCode": "taxLiabilities", - "value": 0.0}, {"dataCode": "acctPay", "value": 836000000.0}, {"dataCode": - "accoci", "value": 0.0}, {"dataCode": "liabilitiesCurrent", "value": 1347000000.0}, - {"dataCode": "inventory", "value": 1503000000.0}, {"dataCode": "sharesBasic", - "value": 213166351.0}, {"dataCode": "liabilitiesNonCurrent", "value": 5758000000.0}, - {"dataCode": "deposits", "value": 0.0}, {"dataCode": "retainedEarnings", "value": - -1200000000.0}, {"dataCode": "debtCurrent", "value": 372000000.0}, {"dataCode": - "cashAndEq", "value": 1904000000.0}, {"dataCode": "ppeq", "value": 3173000000.0}, - {"dataCode": "investmentsNonCurrent", "value": 0.0}, {"dataCode": "investments", - "value": 1212000000.0}, {"dataCode": "debtNonCurrent", "value": 5671000000.0}, - {"dataCode": "totalAssets", "value": 8878000000.0}, {"dataCode": "deferredRev", - "value": 0.0}, {"dataCode": "intangibles", "value": 37000000.0}, {"dataCode": - "taxAssets", "value": 0.0}, {"dataCode": "assetsNonCurrent", "value": 3741000000.0}, - {"dataCode": "totalLiabilities", "value": 7105000000.0}, {"dataCode": "assetsCurrent", - "value": 5137000000.0}, {"dataCode": "debt", "value": 6043000000.0}, {"dataCode": - "acctRec", "value": 369000000.0}], "incomeStatement": [{"dataCode": "costRev", - "value": 3303000000.0}, {"dataCode": "opex", "value": 535000000.0}, {"dataCode": - "shareswa", "value": 134058000.0}, {"dataCode": "netinc", "value": 216000000.0}, - {"dataCode": "intexp", "value": 139000000.0}, {"dataCode": "prefDVDs", "value": - 0.0}, {"dataCode": "shareswaDil", "value": 142587000.0}, {"dataCode": "netIncComStock", - "value": 216000000.0}, {"dataCode": "eps", "value": 1.61}, {"dataCode": "epsDil", - "value": 1.51}, {"dataCode": "ebit", "value": 357000000.0}, {"dataCode": "ebt", - "value": 218000000.0}, {"dataCode": "grossProfit", "value": 929000000.0}, - {"dataCode": "ebitda", "value": 430000000.0}, {"dataCode": "taxExp", "value": - 2000000.0}, {"dataCode": "nonControllingInterests", "value": 157000000.0}, - {"dataCode": "rnd", "value": 0.0}, {"dataCode": "consolidatedIncome", "value": - 373000000.0}, {"dataCode": "revenue", "value": 4232000000.0}, {"dataCode": - "opinc", "value": 394000000.0}, {"dataCode": "sga", "value": 535000000.0}, - {"dataCode": "netIncDiscOps", "value": 0.0}], "cashFlow": [{"dataCode": "ncff", - "value": -53000000.0}, {"dataCode": "ncf", "value": 144000000.0}, {"dataCode": - "investmentsAcqDisposals", "value": 15000000.0}, {"dataCode": "payDiv", "value": - 0.0}, {"dataCode": "businessAcqDisposals", "value": -24000000.0}, {"dataCode": - "depamor", "value": 73000000.0}, {"dataCode": "sbcomp", "value": 23000000.0}, - {"dataCode": "ncfo", "value": 232000000.0}, {"dataCode": "ncfx", "value": - 0.0}, {"dataCode": "freeCashFlow", "value": 206000000.0}, {"dataCode": "issrepayEquity", - "value": 5000000.0}, {"dataCode": "ncfi", "value": -35000000.0}, {"dataCode": - "issrepayDebt", "value": -35000000.0}, {"dataCode": "capex", "value": -26000000.0}], - "overview": [{"dataCode": "revenueQoQ", "value": 0.382554720679517}, {"dataCode": - "grossMargin", "value": 0.219517958412098}, {"dataCode": "debtEquity", "value": - 4.01795212765957}, {"dataCode": "profitMargin", "value": 0.219517958412098}, - {"dataCode": "shareFactor", "value": 1.0}, {"dataCode": "bookVal", "value": - 1773000000.0}, {"dataCode": "rps", "value": 19.8530395634534}, {"dataCode": - "roa", "value": 0.0499059561128527}, {"dataCode": "piotroskiFScore", "value": - 8.0}, {"dataCode": "currentRatio", "value": 3.81365998515219}, {"dataCode": - "longTermDebtEquity", "value": 3.77061170212766}, {"dataCode": "roe", "value": - 0.408100487054601}, {"dataCode": "epsQoQ", "value": 5.70833333333333}, {"dataCode": - "bvps", "value": 8.31744781332772}]}}, {"date": "2024-12-31", "quarter": 4, - "year": 2024, "statementData": {"balanceSheet": [{"dataCode": "deposits", - "value": 0.0}, {"dataCode": "taxAssets", "value": 0.0}, {"dataCode": "liabilitiesNonCurrent", - "value": 5771000000.0}, {"dataCode": "accoci", "value": 0.0}, {"dataCode": - "assetsCurrent", "value": 4869000000.0}, {"dataCode": "retainedEarnings", - "value": -1416000000.0}, {"dataCode": "debtCurrent", "value": 376000000.0}, - {"dataCode": "assetsNonCurrent", "value": 3615000000.0}, {"dataCode": "ppeq", - "value": 3213000000.0}, {"dataCode": "cashAndEq", "value": 1760000000.0}, - {"dataCode": "totalLiabilities", "value": 7109000000.0}, {"dataCode": "investmentsNonCurrent", - "value": 0.0}, {"dataCode": "debtNonCurrent", "value": 5670000000.0}, {"dataCode": - "totalAssets", "value": 8484000000.0}, {"dataCode": "intangibles", "value": - 34000000.0}, {"dataCode": "investmentsCurrent", "value": 1076000000.0}, {"dataCode": - "equity", "value": 1260000000.0}, {"dataCode": "taxLiabilities", "value": - 0.0}, {"dataCode": "acctPay", "value": 856000000.0}, {"dataCode": "acctRec", - "value": 303000000.0}, {"dataCode": "liabilitiesCurrent", "value": 1338000000.0}, - {"dataCode": "deferredRev", "value": 0.0}, {"dataCode": "inventory", "value": - 1608000000.0}, {"dataCode": "investments", "value": 1076000000.0}, {"dataCode": - "sharesBasic", "value": 207629772.0}, {"dataCode": "debt", "value": 6046000000.0}], - "incomeStatement": [{"dataCode": "shareswaDil", "value": 141065000.0}, {"dataCode": - "netIncComStock", "value": 79000000.0}, {"dataCode": "taxExp", "value": -3000000.0}, - {"dataCode": "consolidatedIncome", "value": 159000000.0}, {"dataCode": "eps", - "value": 0.63}, {"dataCode": "sga", "value": 494000000.0}, {"dataCode": "ebt", - "value": 76000000.0}, {"dataCode": "costRev", "value": 2784000000.0}, {"dataCode": - "ebit", "value": 224000000.0}, {"dataCode": "epsDil", "value": 0.58}, {"dataCode": - "opinc", "value": 260000000.0}, {"dataCode": "grossProfit", "value": 763000000.0}, - {"dataCode": "revenue", "value": 3547000000.0}, {"dataCode": "ebitda", "value": - 298000000.0}, {"dataCode": "nonControllingInterests", "value": 80000000.0}, - {"dataCode": "netIncDiscOps", "value": 0.0}, {"dataCode": "prefDVDs", "value": - 0.0}, {"dataCode": "rnd", "value": 0.0}, {"dataCode": "opex", "value": 503000000.0}, - {"dataCode": "shareswa", "value": 130219000.0}, {"dataCode": "netinc", "value": - 79000000.0}, {"dataCode": "intexp", "value": 148000000.0}], "cashFlow": [{"dataCode": - "capex", "value": -22000000.0}, {"dataCode": "ncfo", "value": 60000000.0}, - {"dataCode": "freeCashFlow", "value": 38000000.0}, {"dataCode": "ncff", "value": - 775000000.0}, {"dataCode": "ncfx", "value": 0.0}, {"dataCode": "ncf", "value": - 828000000.0}, {"dataCode": "payDiv", "value": 0.0}, {"dataCode": "issrepayEquity", - "value": 921000000.0}, {"dataCode": "investmentsAcqDisposals", "value": 15000000.0}, - {"dataCode": "depamor", "value": 74000000.0}, {"dataCode": "issrepayDebt", - "value": -129000000.0}, {"dataCode": "businessAcqDisposals", "value": 0.0}, - {"dataCode": "ncfi", "value": -7000000.0}, {"dataCode": "sbcomp", "value": - 22000000.0}], "overview": [{"dataCode": "epsQoQ", "value": -1.5625}, {"dataCode": - "piotroskiFScore", "value": 6.0}, {"dataCode": "bookVal", "value": 1375000000.0}, - {"dataCode": "revenueQoQ", "value": 0.463283828382838}, {"dataCode": "rps", - "value": 17.0832918893732}, {"dataCode": "roe", "value": 0.312732688011914}, - {"dataCode": "bvps", "value": 6.62236434955966}, {"dataCode": "shareFactor", - "value": 1.0}, {"dataCode": "profitMargin", "value": 0.215111361714125}, {"dataCode": - "grossMargin", "value": 0.215111361714125}, {"dataCode": "roa", "value": 0.0279953341109815}, - {"dataCode": "currentRatio", "value": 3.6390134529148}, {"dataCode": "longTermDebtEquity", - "value": 4.5}, {"dataCode": "debtEquity", "value": 4.7984126984127}]}}, {"date": - "2024-12-31", "quarter": 0, "year": 2024, "statementData": {"balanceSheet": - [{"dataCode": "acctPay", "value": 856000000.0}, {"dataCode": "cashAndEq", - "value": 1760000000.0}, {"dataCode": "debtCurrent", "value": 376000000.0}, - {"dataCode": "totalLiabilities", "value": 7109000000.0}, {"dataCode": "investmentsCurrent", - "value": 1076000000.0}, {"dataCode": "accoci", "value": 0.0}, {"dataCode": - "taxLiabilities", "value": 0.0}, {"dataCode": "debt", "value": 6046000000.0}, - {"dataCode": "investments", "value": 1076000000.0}, {"dataCode": "retainedEarnings", - "value": -1416000000.0}, {"dataCode": "acctRec", "value": 303000000.0}, {"dataCode": - "deferredRev", "value": 0.0}, {"dataCode": "inventory", "value": 1608000000.0}, - {"dataCode": "liabilitiesNonCurrent", "value": 5771000000.0}, {"dataCode": - "liabilitiesCurrent", "value": 1338000000.0}, {"dataCode": "sharesBasic", - "value": 207629772.0}, {"dataCode": "deposits", "value": 0.0}, {"dataCode": - "intangibles", "value": 34000000.0}, {"dataCode": "assetsNonCurrent", "value": - 3615000000.0}, {"dataCode": "ppeq", "value": 3213000000.0}, {"dataCode": "totalAssets", - "value": 8484000000.0}, {"dataCode": "equity", "value": 1260000000.0}, {"dataCode": - "debtNonCurrent", "value": 5670000000.0}, {"dataCode": "taxAssets", "value": - 0.0}, {"dataCode": "investmentsNonCurrent", "value": 0.0}, {"dataCode": "assetsCurrent", - "value": 4869000000.0}], "incomeStatement": [{"dataCode": "ebit", "value": - 857000000.0}, {"dataCode": "intexp", "value": 651000000.0}, {"dataCode": "ebt", - "value": 206000000.0}, {"dataCode": "shareswa", "value": 122344000.0}, {"dataCode": - "eps", "value": 1.72}, {"dataCode": "netIncDiscOps", "value": 0.0}, {"dataCode": - "ebitda", "value": 1162000000.0}, {"dataCode": "netIncComStock", "value": - 210000000.0}, {"dataCode": "grossProfit", "value": 2876000000.0}, {"dataCode": - "shareswaDil", "value": 132206000.0}, {"dataCode": "sga", "value": 1874000000.0}, - {"dataCode": "nonControllingInterests", "value": 194000000.0}, {"dataCode": - "consolidatedIncome", "value": 404000000.0}, {"dataCode": "epsDil", "value": - 1.59}, {"dataCode": "costRev", "value": 10797000000.0}, {"dataCode": "netinc", - "value": 210000000.0}, {"dataCode": "taxExp", "value": -4000000.0}, {"dataCode": - "rnd", "value": 0.0}, {"dataCode": "prefDVDs", "value": 0.0}, {"dataCode": - "opinc", "value": 990000000.0}, {"dataCode": "opex", "value": 1886000000.0}, - {"dataCode": "revenue", "value": 13673000000.0}], "cashFlow": [{"dataCode": - "ncfi", "value": -13000000.0}, {"dataCode": "issrepayDebt", "value": -991000000.0}, - {"dataCode": "businessAcqDisposals", "value": 0.0}, {"dataCode": "issrepayEquity", - "value": 1271000000.0}, {"dataCode": "payDiv", "value": 0.0}, {"dataCode": - "ncfo", "value": 918000000.0}, {"dataCode": "ncff", "value": 261000000.0}, - {"dataCode": "depamor", "value": 305000000.0}, {"dataCode": "sbcomp", "value": - 91000000.0}, {"dataCode": "ncf", "value": 1166000000.0}, {"dataCode": "investmentsAcqDisposals", - "value": 67000000.0}, {"dataCode": "ncfx", "value": 0.0}, {"dataCode": "capex", - "value": -80000000.0}, {"dataCode": "freeCashFlow", "value": 838000000.0}], - "overview": [{"dataCode": "shareFactor", "value": 1.0}]}}, {"date": "2024-09-30", - "quarter": 3, "year": 2024, "statementData": {"balanceSheet": [{"dataCode": - "investments", "value": 1016000000.0}, {"dataCode": "liabilitiesNonCurrent", - "value": 5923000000.0}, {"dataCode": "taxAssets", "value": 0.0}, {"dataCode": - "investmentsCurrent", "value": 1016000000.0}, {"dataCode": "equity", "value": - 611000000.0}, {"dataCode": "assetsCurrent", "value": 3765000000.0}, {"dataCode": - "accoci", "value": 0.0}, {"dataCode": "intangibles", "value": 39000000.0}, - {"dataCode": "retainedEarnings", "value": -1495000000.0}, {"dataCode": "liabilitiesCurrent", - "value": 1159000000.0}, {"dataCode": "deferredRev", "value": 0.0}, {"dataCode": - "taxLiabilities", "value": 0.0}, {"dataCode": "acctPay", "value": 772000000.0}, - {"dataCode": "debtCurrent", "value": 285000000.0}, {"dataCode": "sharesBasic", - "value": 206943558.0}, {"dataCode": "ppeq", "value": 3278000000.0}, {"dataCode": - "inventory", "value": 1305000000.0}, {"dataCode": "investmentsNonCurrent", - "value": 0.0}, {"dataCode": "totalLiabilities", "value": 7082000000.0}, {"dataCode": - "deposits", "value": 0.0}, {"dataCode": "assetsNonCurrent", "value": 3603000000.0}, - {"dataCode": "debt", "value": 6145000000.0}, {"dataCode": "acctRec", "value": - 363000000.0}, {"dataCode": "cashAndEq", "value": 932000000.0}, {"dataCode": - "totalAssets", "value": 7368000000.0}, {"dataCode": "debtNonCurrent", "value": - 5860000000.0}], "incomeStatement": [{"dataCode": "nonControllingInterests", - "value": 63000000.0}, {"dataCode": "consolidatedIncome", "value": 148000000.0}, - {"dataCode": "shareswaDil", "value": 133555000.0}, {"dataCode": "taxExp", - "value": -1000000.0}, {"dataCode": "netIncComStock", "value": 85000000.0}, - {"dataCode": "intexp", "value": 157000000.0}, {"dataCode": "eps", "value": - 0.69}, {"dataCode": "netinc", "value": 85000000.0}, {"dataCode": "ebt", "value": - 84000000.0}, {"dataCode": "netIncDiscOps", "value": 0.0}, {"dataCode": "costRev", - "value": 2848000000.0}, {"dataCode": "revenue", "value": 3655000000.0}, {"dataCode": - "ebit", "value": 241000000.0}, {"dataCode": "sga", "value": 469000000.0}, - {"dataCode": "grossProfit", "value": 807000000.0}, {"dataCode": "ebitda", - "value": 314000000.0}, {"dataCode": "prefDVDs", "value": 0.0}, {"dataCode": - "opinc", "value": 337000000.0}, {"dataCode": "opex", "value": 470000000.0}, - {"dataCode": "epsDil", "value": 0.64}, {"dataCode": "shareswa", "value": 123883000.0}, - {"dataCode": "rnd", "value": 0.0}], "cashFlow": [{"dataCode": "issrepayEquity", - "value": 0.0}, {"dataCode": "ncff", "value": -63000000.0}, {"dataCode": "depamor", - "value": 73000000.0}, {"dataCode": "issrepayDebt", "value": -61000000.0}, - {"dataCode": "capex", "value": -26000000.0}, {"dataCode": "ncfx", "value": - 0.0}, {"dataCode": "payDiv", "value": 0.0}, {"dataCode": "sbcomp", "value": - 24000000.0}, {"dataCode": "ncf", "value": 325000000.0}, {"dataCode": "investmentsAcqDisposals", - "value": 11000000.0}, {"dataCode": "ncfo", "value": 403000000.0}, {"dataCode": - "ncfi", "value": -15000000.0}, {"dataCode": "businessAcqDisposals", "value": - 0.0}, {"dataCode": "freeCashFlow", "value": 377000000.0}], "overview": [{"dataCode": - "rps", "value": 17.6618206206738}, {"dataCode": "debtEquity", "value": 10.0572831423895}, - {"dataCode": "epsQoQ", "value": -0.902127659574468}, {"dataCode": "roa", "value": - 0.00237828763290431}, {"dataCode": "longTermDebtEquity", "value": 9.59083469721768}, - {"dataCode": "bookVal", "value": 286000000.0}, {"dataCode": "piotroskiFScore", - "value": 7.0}, {"dataCode": "bvps", "value": 1.38201934268473}, {"dataCode": - "currentRatio", "value": 3.24849007765315}, {"dataCode": "shareFactor", "value": - 1.0}, {"dataCode": "profitMargin", "value": 0.220793433652531}, {"dataCode": - "roe", "value": 0.0407429598562013}, {"dataCode": "revenueQoQ", "value": 0.318067075369636}, - {"dataCode": "grossMargin", "value": 0.220793433652531}]}}, {"date": "2024-06-30", - "quarter": 2, "year": 2024, "statementData": {"balanceSheet": [{"dataCode": - "equity", "value": 526000000.0}, {"dataCode": "assetsCurrent", "value": 3477000000.0}, - {"dataCode": "investments", "value": 1179000000.0}, {"dataCode": "sharesBasic", - "value": 202566719.0}, {"dataCode": "ppeq", "value": 3333000000.0}, {"dataCode": - "debtNonCurrent", "value": 5872000000.0}, {"dataCode": "totalLiabilities", - "value": 7055000000.0}, {"dataCode": "investmentsCurrent", "value": 1179000000.0}, - {"dataCode": "taxLiabilities", "value": 0.0}, {"dataCode": "acctPay", "value": - 742000000.0}, {"dataCode": "debt", "value": 6147000000.0}, {"dataCode": "assetsNonCurrent", - "value": 3693000000.0}, {"dataCode": "taxAssets", "value": 0.0}, {"dataCode": - "deferredRev", "value": 0.0}, {"dataCode": "totalAssets", "value": 7170000000.0}, - {"dataCode": "investmentsNonCurrent", "value": 0.0}, {"dataCode": "debtCurrent", - "value": 275000000.0}, {"dataCode": "retainedEarnings", "value": -1580000000.0}, - {"dataCode": "liabilitiesNonCurrent", "value": 5937000000.0}, {"dataCode": - "deposits", "value": 0.0}, {"dataCode": "inventory", "value": 1221000000.0}, - {"dataCode": "liabilitiesCurrent", "value": 1118000000.0}, {"dataCode": "acctRec", - "value": 349000000.0}, {"dataCode": "cashAndEq", "value": 607000000.0}, {"dataCode": - "intangibles", "value": 43000000.0}, {"dataCode": "accoci", "value": 0.0}], - "incomeStatement": [{"dataCode": "prefDVDs", "value": 0.0}, {"dataCode": "netinc", - "value": 18000000.0}, {"dataCode": "shareswa", "value": 118930000.0}, {"dataCode": - "intexp", "value": 173000000.0}, {"dataCode": "shareswaDil", "value": 128465000.0}, - {"dataCode": "netIncComStock", "value": 18000000.0}, {"dataCode": "eps", "value": - 0.15}, {"dataCode": "ebit", "value": 192000000.0}, {"dataCode": "ebitda", - "value": 268000000.0}, {"dataCode": "revenue", "value": 3410000000.0}, {"dataCode": - "rnd", "value": 0.0}, {"dataCode": "sga", "value": 455000000.0}, {"dataCode": - "netIncDiscOps", "value": 0.0}, {"dataCode": "costRev", "value": 2695000000.0}, - {"dataCode": "opinc", "value": 259000000.0}, {"dataCode": "nonControllingInterests", - "value": 30000000.0}, {"dataCode": "taxExp", "value": 1000000.0}, {"dataCode": - "epsDil", "value": 0.14}, {"dataCode": "grossProfit", "value": 715000000.0}, - {"dataCode": "ebt", "value": 19000000.0}, {"dataCode": "consolidatedIncome", - "value": 48000000.0}, {"dataCode": "opex", "value": 456000000.0}], "cashFlow": - [{"dataCode": "depamor", "value": 76000000.0}, {"dataCode": "freeCashFlow", - "value": 335000000.0}, {"dataCode": "issrepayDebt", "value": -426000000.0}, - {"dataCode": "ncfi", "value": 2000000.0}, {"dataCode": "capex", "value": -19000000.0}, - {"dataCode": "payDiv", "value": 0.0}, {"dataCode": "ncf", "value": 280000000.0}, - {"dataCode": "investmentsAcqDisposals", "value": 21000000.0}, {"dataCode": - "ncff", "value": -76000000.0}, {"dataCode": "issrepayEquity", "value": 350000000.0}, - {"dataCode": "ncfx", "value": 0.0}, {"dataCode": "ncfo", "value": 354000000.0}, - {"dataCode": "sbcomp", "value": 23000000.0}, {"dataCode": "businessAcqDisposals", - "value": 0.0}], "overview": [{"dataCode": "rps", "value": 16.8339597779633}, - {"dataCode": "shareFactor", "value": 1.0}, {"dataCode": "profitMargin", "value": - 0.209677419354839}, {"dataCode": "roe", "value": 2.04438081603436}, {"dataCode": - "debtEquity", "value": 11.6863117870722}, {"dataCode": "roa", "value": 0.101100923926511}, - {"dataCode": "revenueQoQ", "value": 0.148921832884097}, {"dataCode": "currentRatio", - "value": 3.11001788908766}, {"dataCode": "longTermDebtEquity", "value": 11.1634980988593}, - {"dataCode": "bookVal", "value": 115000000.0}, {"dataCode": "grossMargin", - "value": 0.209677419354839}, {"dataCode": "piotroskiFScore", "value": 8.0}, - {"dataCode": "epsQoQ", "value": -1.27272727272727}, {"dataCode": "bvps", "value": - 0.567714186060347}]}}, {"date": "2024-03-31", "quarter": 1, "year": 2024, - "statementData": {"balanceSheet": [{"dataCode": "inventory", "value": 1162000000.0}, - {"dataCode": "ppeq", "value": 3366000000.0}, {"dataCode": "debt", "value": - 6437000000.0}, {"dataCode": "retainedEarnings", "value": -1598000000.0}, {"dataCode": - "sharesBasic", "value": 201899201.0}, {"dataCode": "liabilitiesNonCurrent", - "value": 6020000000.0}, {"dataCode": "accoci", "value": 0.0}, {"dataCode": - "assetsNonCurrent", "value": 3751000000.0}, {"dataCode": "deposits", "value": - 0.0}, {"dataCode": "cashAndEq", "value": 327000000.0}, {"dataCode": "acctPay", - "value": 705000000.0}, {"dataCode": "taxAssets", "value": 0.0}, {"dataCode": - "investmentsCurrent", "value": 1254000000.0}, {"dataCode": "investments", - "value": 1254000000.0}, {"dataCode": "deferredRev", "value": 0.0}, {"dataCode": - "equity", "value": 289000000.0}, {"dataCode": "acctRec", "value": 351000000.0}, - {"dataCode": "taxLiabilities", "value": 0.0}, {"dataCode": "debtNonCurrent", - "value": 5968000000.0}, {"dataCode": "totalLiabilities", "value": 7294000000.0}, - {"dataCode": "totalAssets", "value": 6983000000.0}, {"dataCode": "assetsCurrent", - "value": 3232000000.0}, {"dataCode": "intangibles", "value": 48000000.0}, - {"dataCode": "liabilitiesCurrent", "value": 1274000000.0}, {"dataCode": "investmentsNonCurrent", - "value": 0.0}, {"dataCode": "debtCurrent", "value": 469000000.0}], "incomeStatement": - [{"dataCode": "rnd", "value": 0.0}, {"dataCode": "prefDVDs", "value": 0.0}, - {"dataCode": "netIncComStock", "value": 28000000.0}, {"dataCode": "netIncDiscOps", - "value": 0.0}, {"dataCode": "eps", "value": 0.24}, {"dataCode": "costRev", - "value": 2470000000.0}, {"dataCode": "ebt", "value": 27000000.0}, {"dataCode": - "shareswaDil", "value": 212239000.0}, {"dataCode": "intexp", "value": 173000000.0}, - {"dataCode": "opinc", "value": 134000000.0}, {"dataCode": "epsDil", "value": - 0.23}, {"dataCode": "sga", "value": 456000000.0}, {"dataCode": "opex", "value": - 457000000.0}, {"dataCode": "taxExp", "value": -1000000.0}, {"dataCode": "netinc", - "value": 28000000.0}, {"dataCode": "shareswa", "value": 116298000.0}, {"dataCode": - "ebitda", "value": 282000000.0}, {"dataCode": "nonControllingInterests", "value": - 21000000.0}, {"dataCode": "grossProfit", "value": 591000000.0}, {"dataCode": - "revenue", "value": 3061000000.0}, {"dataCode": "ebit", "value": 200000000.0}, - {"dataCode": "consolidatedIncome", "value": 49000000.0}], "cashFlow": [{"dataCode": - "ncff", "value": -375000000.0}, {"dataCode": "payDiv", "value": 0.0}, {"dataCode": - "businessAcqDisposals", "value": 0.0}, {"dataCode": "sbcomp", "value": 22000000.0}, - {"dataCode": "capex", "value": -13000000.0}, {"dataCode": "ncf", "value": - -267000000.0}, {"dataCode": "ncfi", "value": 7000000.0}, {"dataCode": "investmentsAcqDisposals", - "value": 20000000.0}, {"dataCode": "issrepayEquity", "value": 0.0}, {"dataCode": - "issrepayDebt", "value": -375000000.0}, {"dataCode": "depamor", "value": 82000000.0}, - {"dataCode": "ncfx", "value": 0.0}, {"dataCode": "freeCashFlow", "value": - 88000000.0}, {"dataCode": "ncfo", "value": 101000000.0}], "overview": [{"dataCode": - "shareFactor", "value": 1.0}, {"dataCode": "piotroskiFScore", "value": 8.0}, - {"dataCode": "epsQoQ", "value": -1.15894039735099}, {"dataCode": "grossMargin", - "value": 0.193074158771643}, {"dataCode": "roe", "value": 14.6666666666667}, - {"dataCode": "profitMargin", "value": 0.193074158771643}, {"dataCode": "roa", - "value": 0.0882190265486726}, {"dataCode": "currentRatio", "value": 2.53689167974882}, - {"dataCode": "bookVal", "value": -311000000.0}, {"dataCode": "debtEquity", - "value": 22.2733564013841}, {"dataCode": "rps", "value": 15.1610307759465}, - {"dataCode": "revenueQoQ", "value": 0.174597083653108}, {"dataCode": "longTermDebtEquity", - "value": 20.6505190311419}, {"dataCode": "bvps", "value": -1.54037261395601}]}}, - {"date": "2023-12-31", "quarter": 4, "year": 2023, "statementData": {"balanceSheet": - [{"dataCode": "investmentsCurrent", "value": 1173000000.0}, {"dataCode": "totalLiabilities", - "value": 7455000000.0}, {"dataCode": "cashAndEq", "value": 594000000.0}, {"dataCode": - "debt", "value": 6706000000.0}, {"dataCode": "assetsNonCurrent", "value": - 3750000000.0}, {"dataCode": "taxAssets", "value": 0.0}, {"dataCode": "assetsCurrent", - "value": 3321000000.0}, {"dataCode": "deferredRev", "value": 0.0}, {"dataCode": - "debtNonCurrent", "value": 5849000000.0}, {"dataCode": "totalAssets", "value": - 7071000000.0}, {"dataCode": "investmentsNonCurrent", "value": 0.0}, {"dataCode": - "debtCurrent", "value": 857000000.0}, {"dataCode": "ppeq", "value": 3437000000.0}, - {"dataCode": "retainedEarnings", "value": -1626000000.0}, {"dataCode": "intangibles", - "value": 52000000.0}, {"dataCode": "accoci", "value": 0.0}, {"dataCode": "liabilitiesNonCurrent", - "value": 5919000000.0}, {"dataCode": "deposits", "value": 0.0}, {"dataCode": - "sharesBasic", "value": 199649835.0}, {"dataCode": "inventory", "value": 1150000000.0}, - {"dataCode": "liabilitiesCurrent", "value": 1536000000.0}, {"dataCode": "investments", - "value": 1173000000.0}, {"dataCode": "acctRec", "value": 266000000.0}, {"dataCode": - "equity", "value": 243000000.0}, {"dataCode": "taxLiabilities", "value": 0.0}, - {"dataCode": "acctPay", "value": 596000000.0}], "incomeStatement": [{"dataCode": - "opinc", "value": -38000000.0}, {"dataCode": "sga", "value": 439000000.0}, - {"dataCode": "costRev", "value": 2022000000.0}, {"dataCode": "nonControllingInterests", - "value": -86000000.0}, {"dataCode": "rnd", "value": 0.0}, {"dataCode": "epsDil", - "value": -1.03}, {"dataCode": "taxExp", "value": -2000000.0}, {"dataCode": - "netinc", "value": -114000000.0}, {"dataCode": "ebitda", "value": 131000000.0}, - {"dataCode": "ebit", "value": 49000000.0}, {"dataCode": "grossProfit", "value": - 402000000.0}, {"dataCode": "revenue", "value": 2424000000.0}, {"dataCode": - "netIncComStock", "value": -114000000.0}, {"dataCode": "eps", "value": -1.12}, - {"dataCode": "ebt", "value": -116000000.0}, {"dataCode": "shareswaDil", "value": - 210940000.0}, {"dataCode": "prefDVDs", "value": 0.0}, {"dataCode": "intexp", - "value": 165000000.0}, {"dataCode": "consolidatedIncome", "value": -200000000.0}, - {"dataCode": "shareswa", "value": 114216000.0}, {"dataCode": "opex", "value": - 440000000.0}, {"dataCode": "netIncDiscOps", "value": 0.0}], "cashFlow": [{"dataCode": - "ncf", "value": -22000000.0}, {"dataCode": "ncfi", "value": 9000000.0}, {"dataCode": - "capex", "value": -4000000.0}, {"dataCode": "issrepayEquity", "value": 0.0}, - {"dataCode": "issrepayDebt", "value": 211000000.0}, {"dataCode": "ncfx", "value": - 0.0}, {"dataCode": "freeCashFlow", "value": -243000000.0}, {"dataCode": "ncfo", - "value": -239000000.0}, {"dataCode": "sbcomp", "value": 21000000.0}, {"dataCode": - "businessAcqDisposals", "value": 0.0}, {"dataCode": "depamor", "value": 82000000.0}, - {"dataCode": "investmentsAcqDisposals", "value": 13000000.0}, {"dataCode": - "payDiv", "value": 0.0}, {"dataCode": "ncff", "value": 208000000.0}], "overview": - [{"dataCode": "bvps", "value": -1.92336747986794}, {"dataCode": "rps", "value": - 12.1412572166664}, {"dataCode": "roa", "value": 0.0588408355398647}, {"dataCode": - "bookVal", "value": -384000000.0}, {"dataCode": "profitMargin", "value": 0.165841584158416}, - {"dataCode": "revenueQoQ", "value": -0.145576313006697}, {"dataCode": "debtEquity", - "value": 27.59670781893}, {"dataCode": "grossMargin", "value": 0.165841584158416}, - {"dataCode": "roe", "value": -2.32258064516129}, {"dataCode": "currentRatio", - "value": 2.162109375}, {"dataCode": "piotroskiFScore", "value": 5.0}, {"dataCode": - "longTermDebtEquity", "value": 24.0699588477366}, {"dataCode": "epsQoQ", "value": - -0.857506361323155}, {"dataCode": "shareFactor", "value": 1.0}]}}, {"date": - "2023-12-31", "quarter": 0, "year": 2023, "statementData": {"balanceSheet": - [{"dataCode": "investmentsCurrent", "value": 1173000000.0}, {"dataCode": "intangibles", - "value": 52000000.0}, {"dataCode": "accoci", "value": 0.0}, {"dataCode": "cashAndEq", - "value": 594000000.0}, {"dataCode": "acctRec", "value": 266000000.0}, {"dataCode": - "liabilitiesCurrent", "value": 1536000000.0}, {"dataCode": "inventory", "value": - 1150000000.0}, {"dataCode": "deposits", "value": 0.0}, {"dataCode": "liabilitiesNonCurrent", - "value": 5919000000.0}, {"dataCode": "retainedEarnings", "value": -1626000000.0}, - {"dataCode": "investmentsNonCurrent", "value": 0.0}, {"dataCode": "debtCurrent", - "value": 857000000.0}, {"dataCode": "totalAssets", "value": 7071000000.0}, - {"dataCode": "deferredRev", "value": 0.0}, {"dataCode": "taxAssets", "value": - 0.0}, {"dataCode": "assetsNonCurrent", "value": 3750000000.0}, {"dataCode": - "debt", "value": 6706000000.0}, {"dataCode": "acctPay", "value": 596000000.0}, - {"dataCode": "taxLiabilities", "value": 0.0}, {"dataCode": "equity", "value": - 243000000.0}, {"dataCode": "totalLiabilities", "value": 7455000000.0}, {"dataCode": - "debtNonCurrent", "value": 5849000000.0}, {"dataCode": "ppeq", "value": 3437000000.0}, - {"dataCode": "sharesBasic", "value": 199649835.0}, {"dataCode": "investments", - "value": 1173000000.0}, {"dataCode": "assetsCurrent", "value": 3321000000.0}], - "incomeStatement": [{"dataCode": "consolidatedIncome", "value": 150000000.0}, - {"dataCode": "opex", "value": 1804000000.0}, {"dataCode": "netinc", "value": - 450000000.0}, {"dataCode": "ebt", "value": 475000000.0}, {"dataCode": "grossProfit", - "value": 1724000000.0}, {"dataCode": "epsDil", "value": 0.75}, {"dataCode": - "taxExp", "value": 25000000.0}, {"dataCode": "nonControllingInterests", "value": - -300000000.0}, {"dataCode": "costRev", "value": 9047000000.0}, {"dataCode": - "opinc", "value": -80000000.0}, {"dataCode": "netIncDiscOps", "value": 0.0}, - {"dataCode": "sga", "value": 1796000000.0}, {"dataCode": "rnd", "value": 0.0}, - {"dataCode": "ebit", "value": 1107000000.0}, {"dataCode": "ebitda", "value": - 1459000000.0}, {"dataCode": "revenue", "value": 10771000000.0}, {"dataCode": - "netIncComStock", "value": 450000000.0}, {"dataCode": "eps", "value": 4.12}, - {"dataCode": "shareswaDil", "value": 200578000.0}, {"dataCode": "intexp", - "value": 632000000.0}, {"dataCode": "shareswa", "value": 109323000.0}, {"dataCode": - "prefDVDs", "value": 0.0}], "cashFlow": [{"dataCode": "businessAcqDisposals", - "value": -7000000.0}, {"dataCode": "sbcomp", "value": 73000000.0}, {"dataCode": - "ncfo", "value": 803000000.0}, {"dataCode": "ncfx", "value": 0.0}, {"dataCode": - "issrepayEquity", "value": 453000000.0}, {"dataCode": "ncff", "value": -868000000.0}, - {"dataCode": "ncf", "value": -34000000.0}, {"dataCode": "investmentsAcqDisposals", - "value": 53000000.0}, {"dataCode": "payDiv", "value": 0.0}, {"dataCode": "ncfi", - "value": 31000000.0}, {"dataCode": "capex", "value": -15000000.0}, {"dataCode": - "issrepayDebt", "value": -1306000000.0}, {"dataCode": "freeCashFlow", "value": - 788000000.0}, {"dataCode": "depamor", "value": 352000000.0}], "overview": - [{"dataCode": "shareFactor", "value": 1.0}]}}, {"date": "2023-09-30", "quarter": - 3, "year": 2023, "statementData": {"balanceSheet": [{"dataCode": "ppeq", "value": - 3524000000.0}, {"dataCode": "accoci", "value": 0.0}, {"dataCode": "debtCurrent", - "value": 629000000.0}, {"dataCode": "liabilitiesCurrent", "value": 1395000000.0}, - {"dataCode": "inventory", "value": 1085000000.0}, {"dataCode": "totalLiabilities", - "value": 7227000000.0}, {"dataCode": "intangibles", "value": 56000000.0}, - {"dataCode": "totalAssets", "value": 7025000000.0}, {"dataCode": "investments", - "value": 1021000000.0}, {"dataCode": "investmentsCurrent", "value": 1021000000.0}, - {"dataCode": "acctRec", "value": 318000000.0}, {"dataCode": "deferredRev", - "value": 0.0}, {"dataCode": "cashAndEq", "value": 616000000.0}, {"dataCode": - "debtNonCurrent", "value": 5755000000.0}, {"dataCode": "assetsCurrent", "value": - 3186000000.0}, {"dataCode": "acctPay", "value": 681000000.0}, {"dataCode": - "taxAssets", "value": 0.0}, {"dataCode": "debt", "value": 6384000000.0}, {"dataCode": - "assetsNonCurrent", "value": 3839000000.0}, {"dataCode": "equity", "value": - 339000000.0}, {"dataCode": "taxLiabilities", "value": 0.0}, {"dataCode": "deposits", - "value": 0.0}, {"dataCode": "liabilitiesNonCurrent", "value": 5832000000.0}, - {"dataCode": "retainedEarnings", "value": -1512000000.0}, {"dataCode": "investmentsNonCurrent", - "value": 0.0}, {"dataCode": "sharesBasic", "value": 189444131.0}], "incomeStatement": - [{"dataCode": "epsDil", "value": 3.6}, {"dataCode": "costRev", "value": 2291000000.0}, - {"dataCode": "ebitda", "value": 1051000000.0}, {"dataCode": "grossProfit", - "value": 482000000.0}, {"dataCode": "netIncDiscOps", "value": 0.0}, {"dataCode": - "ebit", "value": 964000000.0}, {"dataCode": "prefDVDs", "value": 0.0}, {"dataCode": - "opex", "value": 434000000.0}, {"dataCode": "shareswa", "value": 110844000.0}, - {"dataCode": "netinc", "value": 782000000.0}, {"dataCode": "taxExp", "value": - 29000000.0}, {"dataCode": "rnd", "value": 0.0}, {"dataCode": "opinc", "value": - 48000000.0}, {"dataCode": "nonControllingInterests", "value": -41000000.0}, - {"dataCode": "revenue", "value": 2773000000.0}, {"dataCode": "shareswaDil", - "value": 205958000.0}, {"dataCode": "intexp", "value": 153000000.0}, {"dataCode": - "eps", "value": 7.05}, {"dataCode": "sga", "value": 433000000.0}, {"dataCode": - "ebt", "value": 811000000.0}, {"dataCode": "netIncComStock", "value": 782000000.0}, - {"dataCode": "consolidatedIncome", "value": 741000000.0}], "cashFlow": [{"dataCode": - "ncfo", "value": 599000000.0}, {"dataCode": "freeCashFlow", "value": 605000000.0}, - {"dataCode": "ncfx", "value": 0.0}, {"dataCode": "issrepayDebt", "value": - -1119000000.0}, {"dataCode": "investmentsAcqDisposals", "value": 10000000.0}, - {"dataCode": "issrepayEquity", "value": 453000000.0}, {"dataCode": "capex", - "value": 6000000.0}, {"dataCode": "ncfi", "value": 16000000.0}, {"dataCode": - "ncf", "value": -61000000.0}, {"dataCode": "sbcomp", "value": 18000000.0}, - {"dataCode": "depamor", "value": 87000000.0}, {"dataCode": "payDiv", "value": - 0.0}, {"dataCode": "ncff", "value": -676000000.0}, {"dataCode": "businessAcqDisposals", - "value": 0.0}], "overview": [{"dataCode": "piotroskiFScore", "value": 5.0}, - {"dataCode": "profitMargin", "value": 0.173818968626037}, {"dataCode": "currentRatio", - "value": 2.28387096774194}, {"dataCode": "shareFactor", "value": 1.0}, {"dataCode": - "roa", "value": -0.0300453162828233}, {"dataCode": "epsQoQ", "value": -3.64044943820225}, - {"dataCode": "debtEquity", "value": 18.8318584070796}, {"dataCode": "roe", - "value": 0.630208333333333}, {"dataCode": "bookVal", "value": -202000000.0}, - {"dataCode": "longTermDebtEquity", "value": 16.976401179941}, {"dataCode": - "revenueQoQ", "value": -0.181039574719433}, {"dataCode": "grossMargin", "value": - 0.173818968626037}, {"dataCode": "bvps", "value": -1.06627742402851}, {"dataCode": - "rps", "value": 14.6375608754013}]}}, {"date": "2023-06-30", "quarter": 2, - "year": 2023, "statementData": {"balanceSheet": [{"dataCode": "sharesBasic", - "value": 189082667.0}, {"dataCode": "ppeq", "value": 3615000000.0}, {"dataCode": - "investmentsCurrent", "value": 1433000000.0}, {"dataCode": "taxLiabilities", - "value": 0.0}, {"dataCode": "assetsNonCurrent", "value": 3937000000.0}, {"dataCode": - "taxAssets", "value": 0.0}, {"dataCode": "debtCurrent", "value": 1360000000.0}, - {"dataCode": "retainedEarnings", "value": -2294000000.0}, {"dataCode": "liabilitiesNonCurrent", - "value": 7076000000.0}, {"dataCode": "liabilitiesCurrent", "value": 2179000000.0}, - {"dataCode": "acctRec", "value": 335000000.0}, {"dataCode": "cashAndEq", "value": - 677000000.0}, {"dataCode": "accoci", "value": 0.0}, {"dataCode": "assetsCurrent", - "value": 3912000000.0}, {"dataCode": "investments", "value": 1433000000.0}, - {"dataCode": "intangibles", "value": 61000000.0}, {"dataCode": "inventory", - "value": 1302000000.0}, {"dataCode": "deposits", "value": 0.0}, {"dataCode": - "investmentsNonCurrent", "value": 0.0}, {"dataCode": "totalAssets", "value": - 7849000000.0}, {"dataCode": "deferredRev", "value": 0.0}, {"dataCode": "debt", - "value": 8368000000.0}, {"dataCode": "acctPay", "value": 739000000.0}, {"dataCode": - "totalLiabilities", "value": 9255000000.0}, {"dataCode": "debtNonCurrent", - "value": 7008000000.0}, {"dataCode": "equity", "value": -697000000.0}], "incomeStatement": - [{"dataCode": "revenue", "value": 2968000000.0}, {"dataCode": "epsDil", "value": - -0.55}, {"dataCode": "netinc", "value": -58000000.0}, {"dataCode": "shareswaDil", - "value": 106222000.0}, {"dataCode": "eps", "value": -0.55}, {"dataCode": "ebitda", - "value": 187000000.0}, {"dataCode": "rnd", "value": 0.0}, {"dataCode": "sga", - "value": 452000000.0}, {"dataCode": "opinc", "value": 42000000.0}, {"dataCode": - "nonControllingInterests", "value": -47000000.0}, {"dataCode": "grossProfit", - "value": 499000000.0}, {"dataCode": "shareswa", "value": 106222000.0}, {"dataCode": - "prefDVDs", "value": 0.0}, {"dataCode": "opex", "value": 457000000.0}, {"dataCode": - "ebt", "value": -58000000.0}, {"dataCode": "taxExp", "value": 0.0}, {"dataCode": - "costRev", "value": 2469000000.0}, {"dataCode": "netIncDiscOps", "value": - 0.0}, {"dataCode": "ebit", "value": 97000000.0}, {"dataCode": "netIncComStock", - "value": -58000000.0}, {"dataCode": "intexp", "value": 155000000.0}, {"dataCode": - "consolidatedIncome", "value": -105000000.0}], "cashFlow": [{"dataCode": "ncfx", - "value": 0.0}, {"dataCode": "freeCashFlow", "value": 512000000.0}, {"dataCode": - "issrepayDebt", "value": -549000000.0}, {"dataCode": "capex", "value": 3000000.0}, - {"dataCode": "payDiv", "value": 0.0}, {"dataCode": "investmentsAcqDisposals", - "value": 22000000.0}, {"dataCode": "ncff", "value": -551000000.0}, {"dataCode": - "issrepayEquity", "value": 0.0}, {"dataCode": "ncfo", "value": 509000000.0}, - {"dataCode": "sbcomp", "value": 19000000.0}, {"dataCode": "businessAcqDisposals", - "value": 0.0}, {"dataCode": "depamor", "value": 90000000.0}, {"dataCode": - "ncf", "value": -17000000.0}, {"dataCode": "ncfi", "value": 25000000.0}], - "overview": [{"dataCode": "debtEquity", "value": -12.0057388809182}, {"dataCode": - "roe", "value": 3.26545908806996}, {"dataCode": "revenueQoQ", "value": -0.235839340885685}, - {"dataCode": "currentRatio", "value": 1.79531895364846}, {"dataCode": "profitMargin", - "value": 0.168126684636119}, {"dataCode": "piotroskiFScore", "value": 6.0}, - {"dataCode": "bvps", "value": -7.43590103898841}, {"dataCode": "longTermDebtEquity", - "value": -10.0545193687231}, {"dataCode": "rps", "value": 15.6968380396285}, - {"dataCode": "bookVal", "value": -1406000000.0}, {"dataCode": "epsQoQ", "value": - -0.765957446808511}, {"dataCode": "roa", "value": -0.150169472051474}, {"dataCode": - "shareFactor", "value": 1.0}, {"dataCode": "grossMargin", "value": 0.168126684636119}]}}, - {"date": "2023-03-31", "quarter": 1, "year": 2023, "statementData": {"balanceSheet": - [{"dataCode": "assetsNonCurrent", "value": 4030000000.0}, {"dataCode": "liabilitiesNonCurrent", - "value": 7118000000.0}, {"dataCode": "debt", "value": 8950000000.0}, {"dataCode": - "taxAssets", "value": 0.0}, {"dataCode": "cashAndEq", "value": 694000000.0}, - {"dataCode": "retainedEarnings", "value": -2236000000.0}, {"dataCode": "deferredRev", - "value": 0.0}, {"dataCode": "totalAssets", "value": 8646000000.0}, {"dataCode": - "investmentsNonCurrent", "value": 0.0}, {"dataCode": "debtCurrent", "value": - 1904000000.0}, {"dataCode": "ppeq", "value": 3714000000.0}, {"dataCode": "intangibles", - "value": 65000000.0}, {"dataCode": "acctRec", "value": 342000000.0}, {"dataCode": - "debtNonCurrent", "value": 7046000000.0}, {"dataCode": "inventory", "value": - 1485000000.0}, {"dataCode": "investments", "value": 1918000000.0}, {"dataCode": - "assetsCurrent", "value": 4616000000.0}, {"dataCode": "liabilitiesCurrent", - "value": 2850000000.0}, {"dataCode": "totalLiabilities", "value": 9968000000.0}, - {"dataCode": "investmentsCurrent", "value": 1918000000.0}, {"dataCode": "accoci", - "value": 0.0}, {"dataCode": "deposits", "value": 0.0}, {"dataCode": "taxLiabilities", - "value": 0.0}, {"dataCode": "sharesBasic", "value": 188974506.0}, {"dataCode": - "equity", "value": -660000000.0}, {"dataCode": "acctPay", "value": 864000000.0}], - "incomeStatement": [{"dataCode": "shareswa", "value": 106011000.0}, {"dataCode": - "taxExp", "value": -2000000.0}, {"dataCode": "grossProfit", "value": 341000000.0}, - {"dataCode": "revenue", "value": 2606000000.0}, {"dataCode": "intexp", "value": - 159000000.0}, {"dataCode": "eps", "value": -1.51}, {"dataCode": "opex", "value": - 473000000.0}, {"dataCode": "netIncComStock", "value": -160000000.0}, {"dataCode": - "ebitda", "value": 90000000.0}, {"dataCode": "ebit", "value": -3000000.0}, - {"dataCode": "rnd", "value": 0.0}, {"dataCode": "prefDVDs", "value": 0.0}, - {"dataCode": "sga", "value": 472000000.0}, {"dataCode": "epsDil", "value": - -1.51}, {"dataCode": "netIncDiscOps", "value": 0.0}, {"dataCode": "netinc", - "value": -160000000.0}, {"dataCode": "consolidatedIncome", "value": -286000000.0}, - {"dataCode": "shareswaDil", "value": 106011000.0}, {"dataCode": "opinc", "value": - -132000000.0}, {"dataCode": "costRev", "value": 2265000000.0}, {"dataCode": - "nonControllingInterests", "value": -126000000.0}, {"dataCode": "ebt", "value": - -162000000.0}], "cashFlow": [{"dataCode": "issrepayEquity", "value": 0.0}, - {"dataCode": "ncfx", "value": 0.0}, {"dataCode": "ncfo", "value": -66000000.0}, - {"dataCode": "depamor", "value": 93000000.0}, {"dataCode": "freeCashFlow", - "value": -86000000.0}, {"dataCode": "issrepayDebt", "value": 151000000.0}, - {"dataCode": "capex", "value": -20000000.0}, {"dataCode": "ncfi", "value": - -19000000.0}, {"dataCode": "businessAcqDisposals", "value": -7000000.0}, {"dataCode": - "payDiv", "value": 0.0}, {"dataCode": "investmentsAcqDisposals", "value": - 8000000.0}, {"dataCode": "ncf", "value": 66000000.0}, {"dataCode": "sbcomp", - "value": 15000000.0}, {"dataCode": "ncff", "value": 151000000.0}], "overview": - [{"dataCode": "longTermDebtEquity", "value": -10.6757575757576}, {"dataCode": - "revenueQoQ", "value": -0.254789819845582}, {"dataCode": "bvps", "value": - -6.99565263051938}, {"dataCode": "grossMargin", "value": 0.130851880276285}, - {"dataCode": "debtEquity", "value": -13.5606060606061}, {"dataCode": "bookVal", - "value": -1322000000.0}, {"dataCode": "epsQoQ", "value": -0.477508650519031}, - {"dataCode": "roe", "value": 16.2958904109589}, {"dataCode": "rps", "value": - 13.7902199358045}, {"dataCode": "roa", "value": -0.158753036005018}, {"dataCode": - "shareFactor", "value": 1.0}, {"dataCode": "currentRatio", "value": 1.61964912280702}, - {"dataCode": "profitMargin", "value": 0.130851880276285}, {"dataCode": "piotroskiFScore", - "value": 3.0}]}}, {"date": "2022-12-31", "quarter": 4, "year": 2022, "statementData": - {"balanceSheet": [{"dataCode": "deferredRev", "value": 0.0}, {"dataCode": - "investments", "value": 1655000000.0}, {"dataCode": "investmentsCurrent", - "value": 1655000000.0}, {"dataCode": "debtNonCurrent", "value": 7081000000.0}, - {"dataCode": "equity", "value": -518000000.0}, {"dataCode": "intangibles", - "value": 70000000.0}, {"dataCode": "totalLiabilities", "value": 9751000000.0}, - {"dataCode": "debt", "value": 8816000000.0}, {"dataCode": "liabilitiesCurrent", - "value": 2592000000.0}, {"dataCode": "liabilitiesNonCurrent", "value": 7159000000.0}, - {"dataCode": "assetsCurrent", "value": 4594000000.0}, {"dataCode": "inventory", - "value": 1876000000.0}, {"dataCode": "investmentsNonCurrent", "value": 0.0}, - {"dataCode": "retainedEarnings", "value": -2076000000.0}, {"dataCode": "totalAssets", - "value": 8698000000.0}, {"dataCode": "taxAssets", "value": 0.0}, {"dataCode": - "debtCurrent", "value": 1735000000.0}, {"dataCode": "acctPay", "value": 777000000.0}, - {"dataCode": "sharesBasic", "value": 188848021.0}, {"dataCode": "assetsNonCurrent", - "value": 4104000000.0}, {"dataCode": "taxLiabilities", "value": 0.0}, {"dataCode": - "ppeq", "value": 3780000000.0}, {"dataCode": "cashAndEq", "value": 628000000.0}, - {"dataCode": "deposits", "value": 0.0}, {"dataCode": "accoci", "value": 0.0}, - {"dataCode": "acctRec", "value": 253000000.0}], "incomeStatement": [{"dataCode": - "netIncDiscOps", "value": 0.0}, {"dataCode": "shareswa", "value": 105910000.0}, - {"dataCode": "costRev", "value": 2644000000.0}, {"dataCode": "grossProfit", - "value": 193000000.0}, {"dataCode": "revenue", "value": 2837000000.0}, {"dataCode": - "epsDil", "value": -7.86}, {"dataCode": "sga", "value": 632000000.0}, {"dataCode": - "rnd", "value": 0.0}, {"dataCode": "opinc", "value": -1300000000.0}, {"dataCode": - "shareswaDil", "value": 105910000.0}, {"dataCode": "eps", "value": -7.86}, - {"dataCode": "netinc", "value": -806000000.0}, {"dataCode": "opex", "value": - 1493000000.0}, {"dataCode": "prefDVDs", "value": 0.0}, {"dataCode": "intexp", - "value": 153000000.0}, {"dataCode": "netIncComStock", "value": -806000000.0}, - {"dataCode": "ebitda", "value": -571000000.0}, {"dataCode": "ebt", "value": - -806000000.0}, {"dataCode": "ebit", "value": -653000000.0}, {"dataCode": "consolidatedIncome", - "value": -1441000000.0}, {"dataCode": "nonControllingInterests", "value": - -635000000.0}, {"dataCode": "taxExp", "value": 0.0}], "cashFlow": [{"dataCode": - "businessAcqDisposals", "value": -7000000.0}, {"dataCode": "payDiv", "value": - 0.0}, {"dataCode": "depamor", "value": 82000000.0}, {"dataCode": "ncfo", "value": - -739000000.0}, {"dataCode": "capex", "value": -17000000.0}, {"dataCode": "ncfi", - "value": -15000000.0}, {"dataCode": "sbcomp", "value": 12000000.0}, {"dataCode": - "ncff", "value": 905000000.0}, {"dataCode": "ncfx", "value": 0.0}, {"dataCode": - "issrepayEquity", "value": 0.0}, {"dataCode": "ncf", "value": 151000000.0}, - {"dataCode": "investmentsAcqDisposals", "value": 9000000.0}, {"dataCode": - "freeCashFlow", "value": -756000000.0}, {"dataCode": "issrepayDebt", "value": - 905000000.0}], "overview": [{"dataCode": "roa", "value": -0.174366862605065}, - {"dataCode": "profitMargin", "value": 0.0680296087416285}, {"dataCode": "epsQoQ", - "value": 6.34579439252336}, {"dataCode": "debtEquity", "value": -17.019305019305}, - {"dataCode": "currentRatio", "value": 1.77237654320988}, {"dataCode": "bookVal", - "value": -1053000000.0}, {"dataCode": "roe", "value": -16.928}, {"dataCode": - "rps", "value": 15.0226620590321}, {"dataCode": "piotroskiFScore", "value": - 3.0}, {"dataCode": "revenueQoQ", "value": -0.244071409539035}, {"dataCode": - "shareFactor", "value": 1.0}, {"dataCode": "longTermDebtEquity", "value": - -13.6698841698842}, {"dataCode": "grossMargin", "value": 0.0680296087416285}, - {"dataCode": "bvps", "value": -5.57591228345464}]}}, {"date": "2022-12-31", - "quarter": 0, "year": 2022, "statementData": {"balanceSheet": [{"dataCode": - "cashAndEq", "value": 628000000.0}, {"dataCode": "debt", "value": 8816000000.0}, - {"dataCode": "taxLiabilities", "value": 0.0}, {"dataCode": "ppeq", "value": - 3780000000.0}, {"dataCode": "intangibles", "value": 70000000.0}, {"dataCode": - "acctPay", "value": 777000000.0}, {"dataCode": "accoci", "value": 0.0}, {"dataCode": - "debtCurrent", "value": 1735000000.0}, {"dataCode": "retainedEarnings", "value": - -2076000000.0}, {"dataCode": "assetsNonCurrent", "value": 4104000000.0}, {"dataCode": - "totalAssets", "value": 8698000000.0}, {"dataCode": "inventory", "value": - 1876000000.0}, {"dataCode": "investments", "value": 1655000000.0}, {"dataCode": - "assetsCurrent", "value": 4594000000.0}, {"dataCode": "liabilitiesCurrent", - "value": 2592000000.0}, {"dataCode": "liabilitiesNonCurrent", "value": 7159000000.0}, - {"dataCode": "totalLiabilities", "value": 9751000000.0}, {"dataCode": "debtNonCurrent", - "value": 7081000000.0}, {"dataCode": "investmentsCurrent", "value": 1655000000.0}, - {"dataCode": "taxAssets", "value": 0.0}, {"dataCode": "acctRec", "value": - 253000000.0}, {"dataCode": "equity", "value": -518000000.0}, {"dataCode": - "deposits", "value": 0.0}, {"dataCode": "investmentsNonCurrent", "value": - 0.0}, {"dataCode": "sharesBasic", "value": 188848021.0}, {"dataCode": "deferredRev", - "value": 0.0}], "incomeStatement": [{"dataCode": "revenue", "value": 13604000000.0}, - {"dataCode": "ebitda", "value": -839000000.0}, {"dataCode": "costRev", "value": - 12358000000.0}, {"dataCode": "intexp", "value": 486000000.0}, {"dataCode": - "netIncComStock", "value": -1587000000.0}, {"dataCode": "shareswaDil", "value": - 100828000.0}, {"dataCode": "prefDVDs", "value": 0.0}, {"dataCode": "opex", - "value": 3597000000.0}, {"dataCode": "eps", "value": -15.74}, {"dataCode": - "netinc", "value": -1587000000.0}, {"dataCode": "opinc", "value": -2351000000.0}, - {"dataCode": "sga", "value": 2736000000.0}, {"dataCode": "rnd", "value": 0.0}, - {"dataCode": "nonControllingInterests", "value": -1307000000.0}, {"dataCode": - "grossProfit", "value": 1246000000.0}, {"dataCode": "epsDil", "value": -15.74}, - {"dataCode": "netIncDiscOps", "value": 0.0}, {"dataCode": "shareswa", "value": - 100828000.0}, {"dataCode": "ebit", "value": -1100000000.0}, {"dataCode": "consolidatedIncome", - "value": -2894000000.0}, {"dataCode": "ebt", "value": -1586000000.0}, {"dataCode": - "taxExp", "value": 1000000.0}], "cashFlow": [{"dataCode": "businessAcqDisposals", - "value": -2196000000.0}, {"dataCode": "ncf", "value": -8000000.0}, {"dataCode": - "ncff", "value": 3899000000.0}, {"dataCode": "sbcomp", "value": 69000000.0}, - {"dataCode": "issrepayEquity", "value": 1231000000.0}, {"dataCode": "ncfi", - "value": -2583000000.0}, {"dataCode": "depamor", "value": 261000000.0}, {"dataCode": - "ncfx", "value": 0.0}, {"dataCode": "capex", "value": -468000000.0}, {"dataCode": - "payDiv", "value": 0.0}, {"dataCode": "issrepayDebt", "value": 2676000000.0}, - {"dataCode": "investmentsAcqDisposals", "value": 81000000.0}, {"dataCode": - "freeCashFlow", "value": -1792000000.0}, {"dataCode": "ncfo", "value": -1324000000.0}], - "overview": [{"dataCode": "shareFactor", "value": 1.0}]}}, {"date": "2022-09-30", - "quarter": 3, "year": 2022, "statementData": {"balanceSheet": [{"dataCode": - "intangibles", "value": 923000000.0}, {"dataCode": "taxAssets", "value": 0.0}, - {"dataCode": "debt", "value": 8073000000.0}, {"dataCode": "accoci", "value": - 0.0}, {"dataCode": "assetsNonCurrent", "value": 5152000000.0}, {"dataCode": - "acctPay", "value": 1009000000.0}, {"dataCode": "taxLiabilities", "value": - 0.0}, {"dataCode": "deposits", "value": 0.0}, {"dataCode": "liabilitiesCurrent", - "value": 1878000000.0}, {"dataCode": "investmentsCurrent", "value": 835000000.0}, - {"dataCode": "totalLiabilities", "value": 9247000000.0}, {"dataCode": "investments", - "value": 835000000.0}, {"dataCode": "inventory", "value": 2577000000.0}, {"dataCode": - "debtNonCurrent", "value": 7285000000.0}, {"dataCode": "acctRec", "value": - 359000000.0}, {"dataCode": "cashAndEq", "value": 477000000.0}, {"dataCode": - "assetsCurrent", "value": 4469000000.0}, {"dataCode": "sharesBasic", "value": - 188702603.0}, {"dataCode": "ppeq", "value": 4015000000.0}, {"dataCode": "retainedEarnings", - "value": -1270000000.0}, {"dataCode": "debtCurrent", "value": 788000000.0}, - {"dataCode": "totalAssets", "value": 9621000000.0}, {"dataCode": "deferredRev", - "value": 0.0}, {"dataCode": "investmentsNonCurrent", "value": 0.0}, {"dataCode": - "liabilitiesNonCurrent", "value": 7369000000.0}, {"dataCode": "equity", "value": - 274000000.0}], "incomeStatement": [{"dataCode": "costRev", "value": 3027000000.0}, - {"dataCode": "shareswaDil", "value": 105857000.0}, {"dataCode": "nonControllingInterests", - "value": -225000000.0}, {"dataCode": "ebt", "value": -283000000.0}, {"dataCode": - "opinc", "value": -297000000.0}, {"dataCode": "consolidatedIncome", "value": - -508000000.0}, {"dataCode": "netIncDiscOps", "value": 0.0}, {"dataCode": "sga", - "value": 656000000.0}, {"dataCode": "rnd", "value": 0.0}, {"dataCode": "ebit", - "value": -130000000.0}, {"dataCode": "epsDil", "value": -2.67}, {"dataCode": - "shareswa", "value": 105857000.0}, {"dataCode": "ebitda", "value": -52000000.0}, - {"dataCode": "prefDVDs", "value": 0.0}, {"dataCode": "netIncComStock", "value": - -283000000.0}, {"dataCode": "netinc", "value": -283000000.0}, {"dataCode": - "eps", "value": -2.67}, {"dataCode": "grossProfit", "value": 359000000.0}, - {"dataCode": "intexp", "value": 153000000.0}, {"dataCode": "revenue", "value": - 3386000000.0}, {"dataCode": "opex", "value": 656000000.0}, {"dataCode": "taxExp", - "value": 0.0}], "cashFlow": [{"dataCode": "sbcomp", "value": 15000000.0}, - {"dataCode": "ncff", "value": -579000000.0}, {"dataCode": "businessAcqDisposals", - "value": 0.0}, {"dataCode": "ncf", "value": -720000000.0}, {"dataCode": "investmentsAcqDisposals", - "value": 47000000.0}, {"dataCode": "payDiv", "value": 0.0}, {"dataCode": "depamor", - "value": 78000000.0}, {"dataCode": "ncfi", "value": -43000000.0}, {"dataCode": - "capex", "value": -90000000.0}, {"dataCode": "issrepayDebt", "value": -579000000.0}, - {"dataCode": "freeCashFlow", "value": -188000000.0}, {"dataCode": "ncfo", - "value": -98000000.0}, {"dataCode": "ncfx", "value": 0.0}, {"dataCode": "issrepayEquity", - "value": 1000000.0}], "overview": [{"dataCode": "roe", "value": -2.9024186822352}, - {"dataCode": "shareFactor", "value": 1.0}, {"dataCode": "currentRatio", "value": - 2.37965921192758}, {"dataCode": "piotroskiFScore", "value": 2.0}, {"dataCode": - "roa", "value": -0.100221755032687}, {"dataCode": "epsQoQ", "value": 6.02631578947368}, - {"dataCode": "debtEquity", "value": 29.463503649635}, {"dataCode": "revenueQoQ", - "value": -0.0270114942528735}, {"dataCode": "profitMargin", "value": 0.106024808033077}, - {"dataCode": "rps", "value": 17.9435786585307}, {"dataCode": "grossMargin", - "value": 0.106024808033077}, {"dataCode": "longTermDebtEquity", "value": 26.5875912408759}, - {"dataCode": "bookVal", "value": 374000000.0}, {"dataCode": "bvps", "value": - 1.98195464214132}]}}]' + string: '[{"date":"2025-03-31","quarter":1,"year":2025,"statementData":{"balanceSheet":[{"dataCode":"equity","value":1504000000.0},{"dataCode":"investmentsCurrent","value":1212000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"acctPay","value":836000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"liabilitiesCurrent","value":1347000000.0},{"dataCode":"inventory","value":1503000000.0},{"dataCode":"sharesBasic","value":213166351.0},{"dataCode":"liabilitiesNonCurrent","value":5758000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"retainedEarnings","value":-1200000000.0},{"dataCode":"debtCurrent","value":372000000.0},{"dataCode":"cashAndEq","value":1904000000.0},{"dataCode":"ppeq","value":3173000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"investments","value":1212000000.0},{"dataCode":"debtNonCurrent","value":5671000000.0},{"dataCode":"totalAssets","value":8878000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"intangibles","value":37000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"assetsNonCurrent","value":3741000000.0},{"dataCode":"totalLiabilities","value":7105000000.0},{"dataCode":"assetsCurrent","value":5137000000.0},{"dataCode":"debt","value":6043000000.0},{"dataCode":"acctRec","value":369000000.0}],"incomeStatement":[{"dataCode":"costRev","value":3303000000.0},{"dataCode":"opex","value":535000000.0},{"dataCode":"shareswa","value":134058000.0},{"dataCode":"netinc","value":216000000.0},{"dataCode":"intexp","value":139000000.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"shareswaDil","value":142587000.0},{"dataCode":"netIncComStock","value":216000000.0},{"dataCode":"eps","value":1.61},{"dataCode":"epsDil","value":1.51},{"dataCode":"ebit","value":357000000.0},{"dataCode":"ebt","value":218000000.0},{"dataCode":"grossProfit","value":929000000.0},{"dataCode":"ebitda","value":430000000.0},{"dataCode":"taxExp","value":2000000.0},{"dataCode":"nonControllingInterests","value":157000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"consolidatedIncome","value":373000000.0},{"dataCode":"revenue","value":4232000000.0},{"dataCode":"opinc","value":394000000.0},{"dataCode":"sga","value":535000000.0},{"dataCode":"netIncDiscOps","value":0.0}],"cashFlow":[{"dataCode":"ncff","value":-53000000.0},{"dataCode":"ncf","value":144000000.0},{"dataCode":"investmentsAcqDisposals","value":15000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"businessAcqDisposals","value":-24000000.0},{"dataCode":"depamor","value":73000000.0},{"dataCode":"sbcomp","value":23000000.0},{"dataCode":"ncfo","value":232000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"freeCashFlow","value":206000000.0},{"dataCode":"issrepayEquity","value":5000000.0},{"dataCode":"ncfi","value":-35000000.0},{"dataCode":"issrepayDebt","value":-35000000.0},{"dataCode":"capex","value":-26000000.0}],"overview":[{"dataCode":"revenueQoQ","value":0.382554720679517},{"dataCode":"grossMargin","value":0.219517958412098},{"dataCode":"debtEquity","value":4.01795212765957},{"dataCode":"profitMargin","value":0.219517958412098},{"dataCode":"shareFactor","value":1.0},{"dataCode":"bookVal","value":1773000000.0},{"dataCode":"rps","value":19.8530395634534},{"dataCode":"roa","value":0.0499059561128527},{"dataCode":"piotroskiFScore","value":8.0},{"dataCode":"currentRatio","value":3.81365998515219},{"dataCode":"longTermDebtEquity","value":3.77061170212766},{"dataCode":"roe","value":0.408100487054601},{"dataCode":"epsQoQ","value":5.70833333333333},{"dataCode":"bvps","value":8.31744781332772}]}},{"date":"2024-12-31","quarter":4,"year":2024,"statementData":{"balanceSheet":[{"dataCode":"deposits","value":0.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"liabilitiesNonCurrent","value":5771000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"assetsCurrent","value":4869000000.0},{"dataCode":"retainedEarnings","value":-1416000000.0},{"dataCode":"debtCurrent","value":376000000.0},{"dataCode":"assetsNonCurrent","value":3615000000.0},{"dataCode":"ppeq","value":3213000000.0},{"dataCode":"cashAndEq","value":1760000000.0},{"dataCode":"totalLiabilities","value":7109000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"debtNonCurrent","value":5670000000.0},{"dataCode":"totalAssets","value":8484000000.0},{"dataCode":"intangibles","value":34000000.0},{"dataCode":"investmentsCurrent","value":1076000000.0},{"dataCode":"equity","value":1260000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"acctPay","value":856000000.0},{"dataCode":"acctRec","value":303000000.0},{"dataCode":"liabilitiesCurrent","value":1338000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"inventory","value":1608000000.0},{"dataCode":"investments","value":1076000000.0},{"dataCode":"sharesBasic","value":207629772.0},{"dataCode":"debt","value":6046000000.0}],"incomeStatement":[{"dataCode":"shareswaDil","value":141065000.0},{"dataCode":"netIncComStock","value":79000000.0},{"dataCode":"taxExp","value":-3000000.0},{"dataCode":"consolidatedIncome","value":159000000.0},{"dataCode":"eps","value":0.63},{"dataCode":"sga","value":494000000.0},{"dataCode":"ebt","value":76000000.0},{"dataCode":"costRev","value":2784000000.0},{"dataCode":"ebit","value":224000000.0},{"dataCode":"epsDil","value":0.58},{"dataCode":"opinc","value":260000000.0},{"dataCode":"grossProfit","value":763000000.0},{"dataCode":"revenue","value":3547000000.0},{"dataCode":"ebitda","value":298000000.0},{"dataCode":"nonControllingInterests","value":80000000.0},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"rnd","value":0.0},{"dataCode":"opex","value":503000000.0},{"dataCode":"shareswa","value":130219000.0},{"dataCode":"netinc","value":79000000.0},{"dataCode":"intexp","value":148000000.0}],"cashFlow":[{"dataCode":"capex","value":-22000000.0},{"dataCode":"ncfo","value":60000000.0},{"dataCode":"freeCashFlow","value":38000000.0},{"dataCode":"ncff","value":775000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"ncf","value":828000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"issrepayEquity","value":921000000.0},{"dataCode":"investmentsAcqDisposals","value":15000000.0},{"dataCode":"depamor","value":74000000.0},{"dataCode":"issrepayDebt","value":-129000000.0},{"dataCode":"businessAcqDisposals","value":0.0},{"dataCode":"ncfi","value":-7000000.0},{"dataCode":"sbcomp","value":22000000.0}],"overview":[{"dataCode":"epsQoQ","value":-1.5625},{"dataCode":"piotroskiFScore","value":6.0},{"dataCode":"bookVal","value":1375000000.0},{"dataCode":"revenueQoQ","value":0.463283828382838},{"dataCode":"rps","value":17.0832918893732},{"dataCode":"roe","value":0.312732688011914},{"dataCode":"bvps","value":6.62236434955966},{"dataCode":"shareFactor","value":1.0},{"dataCode":"profitMargin","value":0.215111361714125},{"dataCode":"grossMargin","value":0.215111361714125},{"dataCode":"roa","value":0.0279953341109815},{"dataCode":"currentRatio","value":3.6390134529148},{"dataCode":"longTermDebtEquity","value":4.5},{"dataCode":"debtEquity","value":4.7984126984127}]}},{"date":"2024-12-31","quarter":0,"year":2024,"statementData":{"balanceSheet":[{"dataCode":"acctPay","value":856000000.0},{"dataCode":"cashAndEq","value":1760000000.0},{"dataCode":"debtCurrent","value":376000000.0},{"dataCode":"totalLiabilities","value":7109000000.0},{"dataCode":"investmentsCurrent","value":1076000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"debt","value":6046000000.0},{"dataCode":"investments","value":1076000000.0},{"dataCode":"retainedEarnings","value":-1416000000.0},{"dataCode":"acctRec","value":303000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"inventory","value":1608000000.0},{"dataCode":"liabilitiesNonCurrent","value":5771000000.0},{"dataCode":"liabilitiesCurrent","value":1338000000.0},{"dataCode":"sharesBasic","value":207629772.0},{"dataCode":"deposits","value":0.0},{"dataCode":"intangibles","value":34000000.0},{"dataCode":"assetsNonCurrent","value":3615000000.0},{"dataCode":"ppeq","value":3213000000.0},{"dataCode":"totalAssets","value":8484000000.0},{"dataCode":"equity","value":1260000000.0},{"dataCode":"debtNonCurrent","value":5670000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"assetsCurrent","value":4869000000.0}],"incomeStatement":[{"dataCode":"ebit","value":857000000.0},{"dataCode":"intexp","value":651000000.0},{"dataCode":"ebt","value":206000000.0},{"dataCode":"shareswa","value":122344000.0},{"dataCode":"eps","value":1.72},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"ebitda","value":1162000000.0},{"dataCode":"netIncComStock","value":210000000.0},{"dataCode":"grossProfit","value":2876000000.0},{"dataCode":"shareswaDil","value":132206000.0},{"dataCode":"sga","value":1874000000.0},{"dataCode":"nonControllingInterests","value":194000000.0},{"dataCode":"consolidatedIncome","value":404000000.0},{"dataCode":"epsDil","value":1.59},{"dataCode":"costRev","value":10797000000.0},{"dataCode":"netinc","value":210000000.0},{"dataCode":"taxExp","value":-4000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"opinc","value":990000000.0},{"dataCode":"opex","value":1886000000.0},{"dataCode":"revenue","value":13673000000.0}],"cashFlow":[{"dataCode":"ncfi","value":-13000000.0},{"dataCode":"issrepayDebt","value":-991000000.0},{"dataCode":"businessAcqDisposals","value":0.0},{"dataCode":"issrepayEquity","value":1271000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"ncfo","value":918000000.0},{"dataCode":"ncff","value":261000000.0},{"dataCode":"depamor","value":305000000.0},{"dataCode":"sbcomp","value":91000000.0},{"dataCode":"ncf","value":1166000000.0},{"dataCode":"investmentsAcqDisposals","value":67000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"capex","value":-80000000.0},{"dataCode":"freeCashFlow","value":838000000.0}],"overview":[{"dataCode":"shareFactor","value":1.0}]}},{"date":"2024-09-30","quarter":3,"year":2024,"statementData":{"balanceSheet":[{"dataCode":"investments","value":1016000000.0},{"dataCode":"liabilitiesNonCurrent","value":5923000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"investmentsCurrent","value":1016000000.0},{"dataCode":"equity","value":611000000.0},{"dataCode":"assetsCurrent","value":3765000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"intangibles","value":39000000.0},{"dataCode":"retainedEarnings","value":-1495000000.0},{"dataCode":"liabilitiesCurrent","value":1159000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"acctPay","value":772000000.0},{"dataCode":"debtCurrent","value":285000000.0},{"dataCode":"sharesBasic","value":206943558.0},{"dataCode":"ppeq","value":3278000000.0},{"dataCode":"inventory","value":1305000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"totalLiabilities","value":7082000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"assetsNonCurrent","value":3603000000.0},{"dataCode":"debt","value":6145000000.0},{"dataCode":"acctRec","value":363000000.0},{"dataCode":"cashAndEq","value":932000000.0},{"dataCode":"totalAssets","value":7368000000.0},{"dataCode":"debtNonCurrent","value":5860000000.0}],"incomeStatement":[{"dataCode":"nonControllingInterests","value":63000000.0},{"dataCode":"consolidatedIncome","value":148000000.0},{"dataCode":"shareswaDil","value":133555000.0},{"dataCode":"taxExp","value":-1000000.0},{"dataCode":"netIncComStock","value":85000000.0},{"dataCode":"intexp","value":157000000.0},{"dataCode":"eps","value":0.69},{"dataCode":"netinc","value":85000000.0},{"dataCode":"ebt","value":84000000.0},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"costRev","value":2848000000.0},{"dataCode":"revenue","value":3655000000.0},{"dataCode":"ebit","value":241000000.0},{"dataCode":"sga","value":469000000.0},{"dataCode":"grossProfit","value":807000000.0},{"dataCode":"ebitda","value":314000000.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"opinc","value":337000000.0},{"dataCode":"opex","value":470000000.0},{"dataCode":"epsDil","value":0.64},{"dataCode":"shareswa","value":123883000.0},{"dataCode":"rnd","value":0.0}],"cashFlow":[{"dataCode":"issrepayEquity","value":0.0},{"dataCode":"ncff","value":-63000000.0},{"dataCode":"depamor","value":73000000.0},{"dataCode":"issrepayDebt","value":-61000000.0},{"dataCode":"capex","value":-26000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"sbcomp","value":24000000.0},{"dataCode":"ncf","value":325000000.0},{"dataCode":"investmentsAcqDisposals","value":11000000.0},{"dataCode":"ncfo","value":403000000.0},{"dataCode":"ncfi","value":-15000000.0},{"dataCode":"businessAcqDisposals","value":0.0},{"dataCode":"freeCashFlow","value":377000000.0}],"overview":[{"dataCode":"rps","value":17.6618206206738},{"dataCode":"debtEquity","value":10.0572831423895},{"dataCode":"epsQoQ","value":-0.902127659574468},{"dataCode":"roa","value":0.00237828763290431},{"dataCode":"longTermDebtEquity","value":9.59083469721768},{"dataCode":"bookVal","value":286000000.0},{"dataCode":"piotroskiFScore","value":7.0},{"dataCode":"bvps","value":1.38201934268473},{"dataCode":"currentRatio","value":3.24849007765315},{"dataCode":"shareFactor","value":1.0},{"dataCode":"profitMargin","value":0.220793433652531},{"dataCode":"roe","value":0.0407429598562013},{"dataCode":"revenueQoQ","value":0.318067075369636},{"dataCode":"grossMargin","value":0.220793433652531}]}},{"date":"2024-06-30","quarter":2,"year":2024,"statementData":{"balanceSheet":[{"dataCode":"equity","value":526000000.0},{"dataCode":"assetsCurrent","value":3477000000.0},{"dataCode":"investments","value":1179000000.0},{"dataCode":"sharesBasic","value":202566719.0},{"dataCode":"ppeq","value":3333000000.0},{"dataCode":"debtNonCurrent","value":5872000000.0},{"dataCode":"totalLiabilities","value":7055000000.0},{"dataCode":"investmentsCurrent","value":1179000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"acctPay","value":742000000.0},{"dataCode":"debt","value":6147000000.0},{"dataCode":"assetsNonCurrent","value":3693000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"totalAssets","value":7170000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"debtCurrent","value":275000000.0},{"dataCode":"retainedEarnings","value":-1580000000.0},{"dataCode":"liabilitiesNonCurrent","value":5937000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"inventory","value":1221000000.0},{"dataCode":"liabilitiesCurrent","value":1118000000.0},{"dataCode":"acctRec","value":349000000.0},{"dataCode":"cashAndEq","value":607000000.0},{"dataCode":"intangibles","value":43000000.0},{"dataCode":"accoci","value":0.0}],"incomeStatement":[{"dataCode":"prefDVDs","value":0.0},{"dataCode":"netinc","value":18000000.0},{"dataCode":"shareswa","value":118930000.0},{"dataCode":"intexp","value":173000000.0},{"dataCode":"shareswaDil","value":128465000.0},{"dataCode":"netIncComStock","value":18000000.0},{"dataCode":"eps","value":0.15},{"dataCode":"ebit","value":192000000.0},{"dataCode":"ebitda","value":268000000.0},{"dataCode":"revenue","value":3410000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"sga","value":455000000.0},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"costRev","value":2695000000.0},{"dataCode":"opinc","value":259000000.0},{"dataCode":"nonControllingInterests","value":30000000.0},{"dataCode":"taxExp","value":1000000.0},{"dataCode":"epsDil","value":0.14},{"dataCode":"grossProfit","value":715000000.0},{"dataCode":"ebt","value":19000000.0},{"dataCode":"consolidatedIncome","value":48000000.0},{"dataCode":"opex","value":456000000.0}],"cashFlow":[{"dataCode":"depamor","value":76000000.0},{"dataCode":"freeCashFlow","value":335000000.0},{"dataCode":"issrepayDebt","value":-426000000.0},{"dataCode":"ncfi","value":2000000.0},{"dataCode":"capex","value":-19000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"ncf","value":280000000.0},{"dataCode":"investmentsAcqDisposals","value":21000000.0},{"dataCode":"ncff","value":-76000000.0},{"dataCode":"issrepayEquity","value":350000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"ncfo","value":354000000.0},{"dataCode":"sbcomp","value":23000000.0},{"dataCode":"businessAcqDisposals","value":0.0}],"overview":[{"dataCode":"rps","value":16.8339597779633},{"dataCode":"shareFactor","value":1.0},{"dataCode":"profitMargin","value":0.209677419354839},{"dataCode":"roe","value":2.04438081603436},{"dataCode":"debtEquity","value":11.6863117870722},{"dataCode":"roa","value":0.101100923926511},{"dataCode":"revenueQoQ","value":0.148921832884097},{"dataCode":"currentRatio","value":3.11001788908766},{"dataCode":"longTermDebtEquity","value":11.1634980988593},{"dataCode":"bookVal","value":115000000.0},{"dataCode":"grossMargin","value":0.209677419354839},{"dataCode":"piotroskiFScore","value":8.0},{"dataCode":"epsQoQ","value":-1.27272727272727},{"dataCode":"bvps","value":0.567714186060347}]}},{"date":"2024-03-31","quarter":1,"year":2024,"statementData":{"balanceSheet":[{"dataCode":"inventory","value":1162000000.0},{"dataCode":"ppeq","value":3366000000.0},{"dataCode":"debt","value":6437000000.0},{"dataCode":"retainedEarnings","value":-1598000000.0},{"dataCode":"sharesBasic","value":201899201.0},{"dataCode":"liabilitiesNonCurrent","value":6020000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"assetsNonCurrent","value":3751000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"cashAndEq","value":327000000.0},{"dataCode":"acctPay","value":705000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"investmentsCurrent","value":1254000000.0},{"dataCode":"investments","value":1254000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"equity","value":289000000.0},{"dataCode":"acctRec","value":351000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"debtNonCurrent","value":5968000000.0},{"dataCode":"totalLiabilities","value":7294000000.0},{"dataCode":"totalAssets","value":6983000000.0},{"dataCode":"assetsCurrent","value":3232000000.0},{"dataCode":"intangibles","value":48000000.0},{"dataCode":"liabilitiesCurrent","value":1274000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"debtCurrent","value":469000000.0}],"incomeStatement":[{"dataCode":"rnd","value":0.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"netIncComStock","value":28000000.0},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"eps","value":0.24},{"dataCode":"costRev","value":2470000000.0},{"dataCode":"ebt","value":27000000.0},{"dataCode":"shareswaDil","value":212239000.0},{"dataCode":"intexp","value":173000000.0},{"dataCode":"opinc","value":134000000.0},{"dataCode":"epsDil","value":0.23},{"dataCode":"sga","value":456000000.0},{"dataCode":"opex","value":457000000.0},{"dataCode":"taxExp","value":-1000000.0},{"dataCode":"netinc","value":28000000.0},{"dataCode":"shareswa","value":116298000.0},{"dataCode":"ebitda","value":282000000.0},{"dataCode":"nonControllingInterests","value":21000000.0},{"dataCode":"grossProfit","value":591000000.0},{"dataCode":"revenue","value":3061000000.0},{"dataCode":"ebit","value":200000000.0},{"dataCode":"consolidatedIncome","value":49000000.0}],"cashFlow":[{"dataCode":"ncff","value":-375000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"businessAcqDisposals","value":0.0},{"dataCode":"sbcomp","value":22000000.0},{"dataCode":"capex","value":-13000000.0},{"dataCode":"ncf","value":-267000000.0},{"dataCode":"ncfi","value":7000000.0},{"dataCode":"investmentsAcqDisposals","value":20000000.0},{"dataCode":"issrepayEquity","value":0.0},{"dataCode":"issrepayDebt","value":-375000000.0},{"dataCode":"depamor","value":82000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"freeCashFlow","value":88000000.0},{"dataCode":"ncfo","value":101000000.0}],"overview":[{"dataCode":"shareFactor","value":1.0},{"dataCode":"piotroskiFScore","value":8.0},{"dataCode":"epsQoQ","value":-1.15894039735099},{"dataCode":"grossMargin","value":0.193074158771643},{"dataCode":"roe","value":14.6666666666667},{"dataCode":"profitMargin","value":0.193074158771643},{"dataCode":"roa","value":0.0882190265486726},{"dataCode":"currentRatio","value":2.53689167974882},{"dataCode":"bookVal","value":-311000000.0},{"dataCode":"debtEquity","value":22.2733564013841},{"dataCode":"rps","value":15.1610307759465},{"dataCode":"revenueQoQ","value":0.174597083653108},{"dataCode":"longTermDebtEquity","value":20.6505190311419},{"dataCode":"bvps","value":-1.54037261395601}]}},{"date":"2023-12-31","quarter":4,"year":2023,"statementData":{"balanceSheet":[{"dataCode":"investmentsCurrent","value":1173000000.0},{"dataCode":"totalLiabilities","value":7455000000.0},{"dataCode":"cashAndEq","value":594000000.0},{"dataCode":"debt","value":6706000000.0},{"dataCode":"assetsNonCurrent","value":3750000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"assetsCurrent","value":3321000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"debtNonCurrent","value":5849000000.0},{"dataCode":"totalAssets","value":7071000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"debtCurrent","value":857000000.0},{"dataCode":"ppeq","value":3437000000.0},{"dataCode":"retainedEarnings","value":-1626000000.0},{"dataCode":"intangibles","value":52000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"liabilitiesNonCurrent","value":5919000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"sharesBasic","value":199649835.0},{"dataCode":"inventory","value":1150000000.0},{"dataCode":"liabilitiesCurrent","value":1536000000.0},{"dataCode":"investments","value":1173000000.0},{"dataCode":"acctRec","value":266000000.0},{"dataCode":"equity","value":243000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"acctPay","value":596000000.0}],"incomeStatement":[{"dataCode":"opinc","value":-38000000.0},{"dataCode":"sga","value":439000000.0},{"dataCode":"costRev","value":2022000000.0},{"dataCode":"nonControllingInterests","value":-86000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"epsDil","value":-1.03},{"dataCode":"taxExp","value":-2000000.0},{"dataCode":"netinc","value":-114000000.0},{"dataCode":"ebitda","value":131000000.0},{"dataCode":"ebit","value":49000000.0},{"dataCode":"grossProfit","value":402000000.0},{"dataCode":"revenue","value":2424000000.0},{"dataCode":"netIncComStock","value":-114000000.0},{"dataCode":"eps","value":-1.12},{"dataCode":"ebt","value":-116000000.0},{"dataCode":"shareswaDil","value":210940000.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"intexp","value":165000000.0},{"dataCode":"consolidatedIncome","value":-200000000.0},{"dataCode":"shareswa","value":114216000.0},{"dataCode":"opex","value":440000000.0},{"dataCode":"netIncDiscOps","value":0.0}],"cashFlow":[{"dataCode":"ncf","value":-22000000.0},{"dataCode":"ncfi","value":9000000.0},{"dataCode":"capex","value":-4000000.0},{"dataCode":"issrepayEquity","value":0.0},{"dataCode":"issrepayDebt","value":211000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"freeCashFlow","value":-243000000.0},{"dataCode":"ncfo","value":-239000000.0},{"dataCode":"sbcomp","value":21000000.0},{"dataCode":"businessAcqDisposals","value":0.0},{"dataCode":"depamor","value":82000000.0},{"dataCode":"investmentsAcqDisposals","value":13000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"ncff","value":208000000.0}],"overview":[{"dataCode":"bvps","value":-1.92336747986794},{"dataCode":"rps","value":12.1412572166664},{"dataCode":"roa","value":0.0588408355398647},{"dataCode":"bookVal","value":-384000000.0},{"dataCode":"profitMargin","value":0.165841584158416},{"dataCode":"revenueQoQ","value":-0.145576313006697},{"dataCode":"debtEquity","value":27.59670781893},{"dataCode":"grossMargin","value":0.165841584158416},{"dataCode":"roe","value":-2.32258064516129},{"dataCode":"currentRatio","value":2.162109375},{"dataCode":"piotroskiFScore","value":5.0},{"dataCode":"longTermDebtEquity","value":24.0699588477366},{"dataCode":"epsQoQ","value":-0.857506361323155},{"dataCode":"shareFactor","value":1.0}]}},{"date":"2023-12-31","quarter":0,"year":2023,"statementData":{"balanceSheet":[{"dataCode":"investmentsCurrent","value":1173000000.0},{"dataCode":"intangibles","value":52000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"cashAndEq","value":594000000.0},{"dataCode":"acctRec","value":266000000.0},{"dataCode":"liabilitiesCurrent","value":1536000000.0},{"dataCode":"inventory","value":1150000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"liabilitiesNonCurrent","value":5919000000.0},{"dataCode":"retainedEarnings","value":-1626000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"debtCurrent","value":857000000.0},{"dataCode":"totalAssets","value":7071000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"assetsNonCurrent","value":3750000000.0},{"dataCode":"debt","value":6706000000.0},{"dataCode":"acctPay","value":596000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"equity","value":243000000.0},{"dataCode":"totalLiabilities","value":7455000000.0},{"dataCode":"debtNonCurrent","value":5849000000.0},{"dataCode":"ppeq","value":3437000000.0},{"dataCode":"sharesBasic","value":199649835.0},{"dataCode":"investments","value":1173000000.0},{"dataCode":"assetsCurrent","value":3321000000.0}],"incomeStatement":[{"dataCode":"consolidatedIncome","value":150000000.0},{"dataCode":"opex","value":1804000000.0},{"dataCode":"netinc","value":450000000.0},{"dataCode":"ebt","value":475000000.0},{"dataCode":"grossProfit","value":1724000000.0},{"dataCode":"epsDil","value":0.75},{"dataCode":"taxExp","value":25000000.0},{"dataCode":"nonControllingInterests","value":-300000000.0},{"dataCode":"costRev","value":9047000000.0},{"dataCode":"opinc","value":-80000000.0},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"sga","value":1796000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"ebit","value":1107000000.0},{"dataCode":"ebitda","value":1459000000.0},{"dataCode":"revenue","value":10771000000.0},{"dataCode":"netIncComStock","value":450000000.0},{"dataCode":"eps","value":4.12},{"dataCode":"shareswaDil","value":200578000.0},{"dataCode":"intexp","value":632000000.0},{"dataCode":"shareswa","value":109323000.0},{"dataCode":"prefDVDs","value":0.0}],"cashFlow":[{"dataCode":"businessAcqDisposals","value":-7000000.0},{"dataCode":"sbcomp","value":73000000.0},{"dataCode":"ncfo","value":803000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"issrepayEquity","value":453000000.0},{"dataCode":"ncff","value":-868000000.0},{"dataCode":"ncf","value":-34000000.0},{"dataCode":"investmentsAcqDisposals","value":53000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"ncfi","value":31000000.0},{"dataCode":"capex","value":-15000000.0},{"dataCode":"issrepayDebt","value":-1306000000.0},{"dataCode":"freeCashFlow","value":788000000.0},{"dataCode":"depamor","value":352000000.0}],"overview":[{"dataCode":"shareFactor","value":1.0}]}},{"date":"2023-09-30","quarter":3,"year":2023,"statementData":{"balanceSheet":[{"dataCode":"ppeq","value":3524000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"debtCurrent","value":629000000.0},{"dataCode":"liabilitiesCurrent","value":1395000000.0},{"dataCode":"inventory","value":1085000000.0},{"dataCode":"totalLiabilities","value":7227000000.0},{"dataCode":"intangibles","value":56000000.0},{"dataCode":"totalAssets","value":7025000000.0},{"dataCode":"investments","value":1021000000.0},{"dataCode":"investmentsCurrent","value":1021000000.0},{"dataCode":"acctRec","value":318000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"cashAndEq","value":616000000.0},{"dataCode":"debtNonCurrent","value":5755000000.0},{"dataCode":"assetsCurrent","value":3186000000.0},{"dataCode":"acctPay","value":681000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"debt","value":6384000000.0},{"dataCode":"assetsNonCurrent","value":3839000000.0},{"dataCode":"equity","value":339000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"deposits","value":0.0},{"dataCode":"liabilitiesNonCurrent","value":5832000000.0},{"dataCode":"retainedEarnings","value":-1512000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"sharesBasic","value":189444131.0}],"incomeStatement":[{"dataCode":"epsDil","value":3.6},{"dataCode":"costRev","value":2291000000.0},{"dataCode":"ebitda","value":1051000000.0},{"dataCode":"grossProfit","value":482000000.0},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"ebit","value":964000000.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"opex","value":434000000.0},{"dataCode":"shareswa","value":110844000.0},{"dataCode":"netinc","value":782000000.0},{"dataCode":"taxExp","value":29000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"opinc","value":48000000.0},{"dataCode":"nonControllingInterests","value":-41000000.0},{"dataCode":"revenue","value":2773000000.0},{"dataCode":"shareswaDil","value":205958000.0},{"dataCode":"intexp","value":153000000.0},{"dataCode":"eps","value":7.05},{"dataCode":"sga","value":433000000.0},{"dataCode":"ebt","value":811000000.0},{"dataCode":"netIncComStock","value":782000000.0},{"dataCode":"consolidatedIncome","value":741000000.0}],"cashFlow":[{"dataCode":"ncfo","value":599000000.0},{"dataCode":"freeCashFlow","value":605000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"issrepayDebt","value":-1119000000.0},{"dataCode":"investmentsAcqDisposals","value":10000000.0},{"dataCode":"issrepayEquity","value":453000000.0},{"dataCode":"capex","value":6000000.0},{"dataCode":"ncfi","value":16000000.0},{"dataCode":"ncf","value":-61000000.0},{"dataCode":"sbcomp","value":18000000.0},{"dataCode":"depamor","value":87000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"ncff","value":-676000000.0},{"dataCode":"businessAcqDisposals","value":0.0}],"overview":[{"dataCode":"piotroskiFScore","value":5.0},{"dataCode":"profitMargin","value":0.173818968626037},{"dataCode":"currentRatio","value":2.28387096774194},{"dataCode":"shareFactor","value":1.0},{"dataCode":"roa","value":-0.0300453162828233},{"dataCode":"epsQoQ","value":-3.64044943820225},{"dataCode":"debtEquity","value":18.8318584070796},{"dataCode":"roe","value":0.630208333333333},{"dataCode":"bookVal","value":-202000000.0},{"dataCode":"longTermDebtEquity","value":16.976401179941},{"dataCode":"revenueQoQ","value":-0.181039574719433},{"dataCode":"grossMargin","value":0.173818968626037},{"dataCode":"bvps","value":-1.06627742402851},{"dataCode":"rps","value":14.6375608754013}]}},{"date":"2023-06-30","quarter":2,"year":2023,"statementData":{"balanceSheet":[{"dataCode":"sharesBasic","value":189082667.0},{"dataCode":"ppeq","value":3615000000.0},{"dataCode":"investmentsCurrent","value":1433000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"assetsNonCurrent","value":3937000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"debtCurrent","value":1360000000.0},{"dataCode":"retainedEarnings","value":-2294000000.0},{"dataCode":"liabilitiesNonCurrent","value":7076000000.0},{"dataCode":"liabilitiesCurrent","value":2179000000.0},{"dataCode":"acctRec","value":335000000.0},{"dataCode":"cashAndEq","value":677000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"assetsCurrent","value":3912000000.0},{"dataCode":"investments","value":1433000000.0},{"dataCode":"intangibles","value":61000000.0},{"dataCode":"inventory","value":1302000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"totalAssets","value":7849000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"debt","value":8368000000.0},{"dataCode":"acctPay","value":739000000.0},{"dataCode":"totalLiabilities","value":9255000000.0},{"dataCode":"debtNonCurrent","value":7008000000.0},{"dataCode":"equity","value":-697000000.0}],"incomeStatement":[{"dataCode":"revenue","value":2968000000.0},{"dataCode":"epsDil","value":-0.55},{"dataCode":"netinc","value":-58000000.0},{"dataCode":"shareswaDil","value":106222000.0},{"dataCode":"eps","value":-0.55},{"dataCode":"ebitda","value":187000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"sga","value":452000000.0},{"dataCode":"opinc","value":42000000.0},{"dataCode":"nonControllingInterests","value":-47000000.0},{"dataCode":"grossProfit","value":499000000.0},{"dataCode":"shareswa","value":106222000.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"opex","value":457000000.0},{"dataCode":"ebt","value":-58000000.0},{"dataCode":"taxExp","value":0.0},{"dataCode":"costRev","value":2469000000.0},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"ebit","value":97000000.0},{"dataCode":"netIncComStock","value":-58000000.0},{"dataCode":"intexp","value":155000000.0},{"dataCode":"consolidatedIncome","value":-105000000.0}],"cashFlow":[{"dataCode":"ncfx","value":0.0},{"dataCode":"freeCashFlow","value":512000000.0},{"dataCode":"issrepayDebt","value":-549000000.0},{"dataCode":"capex","value":3000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"investmentsAcqDisposals","value":22000000.0},{"dataCode":"ncff","value":-551000000.0},{"dataCode":"issrepayEquity","value":0.0},{"dataCode":"ncfo","value":509000000.0},{"dataCode":"sbcomp","value":19000000.0},{"dataCode":"businessAcqDisposals","value":0.0},{"dataCode":"depamor","value":90000000.0},{"dataCode":"ncf","value":-17000000.0},{"dataCode":"ncfi","value":25000000.0}],"overview":[{"dataCode":"debtEquity","value":-12.0057388809182},{"dataCode":"roe","value":3.26545908806996},{"dataCode":"revenueQoQ","value":-0.235839340885685},{"dataCode":"currentRatio","value":1.79531895364846},{"dataCode":"profitMargin","value":0.168126684636119},{"dataCode":"piotroskiFScore","value":6.0},{"dataCode":"bvps","value":-7.43590103898841},{"dataCode":"longTermDebtEquity","value":-10.0545193687231},{"dataCode":"rps","value":15.6968380396285},{"dataCode":"bookVal","value":-1406000000.0},{"dataCode":"epsQoQ","value":-0.765957446808511},{"dataCode":"roa","value":-0.150169472051474},{"dataCode":"shareFactor","value":1.0},{"dataCode":"grossMargin","value":0.168126684636119}]}},{"date":"2023-03-31","quarter":1,"year":2023,"statementData":{"balanceSheet":[{"dataCode":"assetsNonCurrent","value":4030000000.0},{"dataCode":"liabilitiesNonCurrent","value":7118000000.0},{"dataCode":"debt","value":8950000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"cashAndEq","value":694000000.0},{"dataCode":"retainedEarnings","value":-2236000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"totalAssets","value":8646000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"debtCurrent","value":1904000000.0},{"dataCode":"ppeq","value":3714000000.0},{"dataCode":"intangibles","value":65000000.0},{"dataCode":"acctRec","value":342000000.0},{"dataCode":"debtNonCurrent","value":7046000000.0},{"dataCode":"inventory","value":1485000000.0},{"dataCode":"investments","value":1918000000.0},{"dataCode":"assetsCurrent","value":4616000000.0},{"dataCode":"liabilitiesCurrent","value":2850000000.0},{"dataCode":"totalLiabilities","value":9968000000.0},{"dataCode":"investmentsCurrent","value":1918000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"deposits","value":0.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"sharesBasic","value":188974506.0},{"dataCode":"equity","value":-660000000.0},{"dataCode":"acctPay","value":864000000.0}],"incomeStatement":[{"dataCode":"shareswa","value":106011000.0},{"dataCode":"taxExp","value":-2000000.0},{"dataCode":"grossProfit","value":341000000.0},{"dataCode":"revenue","value":2606000000.0},{"dataCode":"intexp","value":159000000.0},{"dataCode":"eps","value":-1.51},{"dataCode":"opex","value":473000000.0},{"dataCode":"netIncComStock","value":-160000000.0},{"dataCode":"ebitda","value":90000000.0},{"dataCode":"ebit","value":-3000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"sga","value":472000000.0},{"dataCode":"epsDil","value":-1.51},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"netinc","value":-160000000.0},{"dataCode":"consolidatedIncome","value":-286000000.0},{"dataCode":"shareswaDil","value":106011000.0},{"dataCode":"opinc","value":-132000000.0},{"dataCode":"costRev","value":2265000000.0},{"dataCode":"nonControllingInterests","value":-126000000.0},{"dataCode":"ebt","value":-162000000.0}],"cashFlow":[{"dataCode":"issrepayEquity","value":0.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"ncfo","value":-66000000.0},{"dataCode":"depamor","value":93000000.0},{"dataCode":"freeCashFlow","value":-86000000.0},{"dataCode":"issrepayDebt","value":151000000.0},{"dataCode":"capex","value":-20000000.0},{"dataCode":"ncfi","value":-19000000.0},{"dataCode":"businessAcqDisposals","value":-7000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"investmentsAcqDisposals","value":8000000.0},{"dataCode":"ncf","value":66000000.0},{"dataCode":"sbcomp","value":15000000.0},{"dataCode":"ncff","value":151000000.0}],"overview":[{"dataCode":"longTermDebtEquity","value":-10.6757575757576},{"dataCode":"revenueQoQ","value":-0.254789819845582},{"dataCode":"bvps","value":-6.99565263051938},{"dataCode":"grossMargin","value":0.130851880276285},{"dataCode":"debtEquity","value":-13.5606060606061},{"dataCode":"bookVal","value":-1322000000.0},{"dataCode":"epsQoQ","value":-0.477508650519031},{"dataCode":"roe","value":16.2958904109589},{"dataCode":"rps","value":13.7902199358045},{"dataCode":"roa","value":-0.158753036005018},{"dataCode":"shareFactor","value":1.0},{"dataCode":"currentRatio","value":1.61964912280702},{"dataCode":"profitMargin","value":0.130851880276285},{"dataCode":"piotroskiFScore","value":3.0}]}},{"date":"2022-12-31","quarter":4,"year":2022,"statementData":{"balanceSheet":[{"dataCode":"deferredRev","value":0.0},{"dataCode":"investments","value":1655000000.0},{"dataCode":"investmentsCurrent","value":1655000000.0},{"dataCode":"debtNonCurrent","value":7081000000.0},{"dataCode":"equity","value":-518000000.0},{"dataCode":"intangibles","value":70000000.0},{"dataCode":"totalLiabilities","value":9751000000.0},{"dataCode":"debt","value":8816000000.0},{"dataCode":"liabilitiesCurrent","value":2592000000.0},{"dataCode":"liabilitiesNonCurrent","value":7159000000.0},{"dataCode":"assetsCurrent","value":4594000000.0},{"dataCode":"inventory","value":1876000000.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"retainedEarnings","value":-2076000000.0},{"dataCode":"totalAssets","value":8698000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"debtCurrent","value":1735000000.0},{"dataCode":"acctPay","value":777000000.0},{"dataCode":"sharesBasic","value":188848021.0},{"dataCode":"assetsNonCurrent","value":4104000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"ppeq","value":3780000000.0},{"dataCode":"cashAndEq","value":628000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"accoci","value":0.0},{"dataCode":"acctRec","value":253000000.0}],"incomeStatement":[{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"shareswa","value":105910000.0},{"dataCode":"costRev","value":2644000000.0},{"dataCode":"grossProfit","value":193000000.0},{"dataCode":"revenue","value":2837000000.0},{"dataCode":"epsDil","value":-7.86},{"dataCode":"sga","value":632000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"opinc","value":-1300000000.0},{"dataCode":"shareswaDil","value":105910000.0},{"dataCode":"eps","value":-7.86},{"dataCode":"netinc","value":-806000000.0},{"dataCode":"opex","value":1493000000.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"intexp","value":153000000.0},{"dataCode":"netIncComStock","value":-806000000.0},{"dataCode":"ebitda","value":-571000000.0},{"dataCode":"ebt","value":-806000000.0},{"dataCode":"ebit","value":-653000000.0},{"dataCode":"consolidatedIncome","value":-1441000000.0},{"dataCode":"nonControllingInterests","value":-635000000.0},{"dataCode":"taxExp","value":0.0}],"cashFlow":[{"dataCode":"businessAcqDisposals","value":-7000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"depamor","value":82000000.0},{"dataCode":"ncfo","value":-739000000.0},{"dataCode":"capex","value":-17000000.0},{"dataCode":"ncfi","value":-15000000.0},{"dataCode":"sbcomp","value":12000000.0},{"dataCode":"ncff","value":905000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"issrepayEquity","value":0.0},{"dataCode":"ncf","value":151000000.0},{"dataCode":"investmentsAcqDisposals","value":9000000.0},{"dataCode":"freeCashFlow","value":-756000000.0},{"dataCode":"issrepayDebt","value":905000000.0}],"overview":[{"dataCode":"roa","value":-0.174366862605065},{"dataCode":"profitMargin","value":0.0680296087416285},{"dataCode":"epsQoQ","value":6.34579439252336},{"dataCode":"debtEquity","value":-17.019305019305},{"dataCode":"currentRatio","value":1.77237654320988},{"dataCode":"bookVal","value":-1053000000.0},{"dataCode":"roe","value":-16.928},{"dataCode":"rps","value":15.0226620590321},{"dataCode":"piotroskiFScore","value":3.0},{"dataCode":"revenueQoQ","value":-0.244071409539035},{"dataCode":"shareFactor","value":1.0},{"dataCode":"longTermDebtEquity","value":-13.6698841698842},{"dataCode":"grossMargin","value":0.0680296087416285},{"dataCode":"bvps","value":-5.57591228345464}]}},{"date":"2022-12-31","quarter":0,"year":2022,"statementData":{"balanceSheet":[{"dataCode":"cashAndEq","value":628000000.0},{"dataCode":"debt","value":8816000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"ppeq","value":3780000000.0},{"dataCode":"intangibles","value":70000000.0},{"dataCode":"acctPay","value":777000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"debtCurrent","value":1735000000.0},{"dataCode":"retainedEarnings","value":-2076000000.0},{"dataCode":"assetsNonCurrent","value":4104000000.0},{"dataCode":"totalAssets","value":8698000000.0},{"dataCode":"inventory","value":1876000000.0},{"dataCode":"investments","value":1655000000.0},{"dataCode":"assetsCurrent","value":4594000000.0},{"dataCode":"liabilitiesCurrent","value":2592000000.0},{"dataCode":"liabilitiesNonCurrent","value":7159000000.0},{"dataCode":"totalLiabilities","value":9751000000.0},{"dataCode":"debtNonCurrent","value":7081000000.0},{"dataCode":"investmentsCurrent","value":1655000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"acctRec","value":253000000.0},{"dataCode":"equity","value":-518000000.0},{"dataCode":"deposits","value":0.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"sharesBasic","value":188848021.0},{"dataCode":"deferredRev","value":0.0}],"incomeStatement":[{"dataCode":"revenue","value":13604000000.0},{"dataCode":"ebitda","value":-839000000.0},{"dataCode":"costRev","value":12358000000.0},{"dataCode":"intexp","value":486000000.0},{"dataCode":"netIncComStock","value":-1587000000.0},{"dataCode":"shareswaDil","value":100828000.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"opex","value":3597000000.0},{"dataCode":"eps","value":-15.74},{"dataCode":"netinc","value":-1587000000.0},{"dataCode":"opinc","value":-2351000000.0},{"dataCode":"sga","value":2736000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"nonControllingInterests","value":-1307000000.0},{"dataCode":"grossProfit","value":1246000000.0},{"dataCode":"epsDil","value":-15.74},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"shareswa","value":100828000.0},{"dataCode":"ebit","value":-1100000000.0},{"dataCode":"consolidatedIncome","value":-2894000000.0},{"dataCode":"ebt","value":-1586000000.0},{"dataCode":"taxExp","value":1000000.0}],"cashFlow":[{"dataCode":"businessAcqDisposals","value":-2196000000.0},{"dataCode":"ncf","value":-8000000.0},{"dataCode":"ncff","value":3899000000.0},{"dataCode":"sbcomp","value":69000000.0},{"dataCode":"issrepayEquity","value":1231000000.0},{"dataCode":"ncfi","value":-2583000000.0},{"dataCode":"depamor","value":261000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"capex","value":-468000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"issrepayDebt","value":2676000000.0},{"dataCode":"investmentsAcqDisposals","value":81000000.0},{"dataCode":"freeCashFlow","value":-1792000000.0},{"dataCode":"ncfo","value":-1324000000.0}],"overview":[{"dataCode":"shareFactor","value":1.0}]}},{"date":"2022-09-30","quarter":3,"year":2022,"statementData":{"balanceSheet":[{"dataCode":"intangibles","value":923000000.0},{"dataCode":"taxAssets","value":0.0},{"dataCode":"debt","value":8073000000.0},{"dataCode":"accoci","value":0.0},{"dataCode":"assetsNonCurrent","value":5152000000.0},{"dataCode":"acctPay","value":1009000000.0},{"dataCode":"taxLiabilities","value":0.0},{"dataCode":"deposits","value":0.0},{"dataCode":"liabilitiesCurrent","value":1878000000.0},{"dataCode":"investmentsCurrent","value":835000000.0},{"dataCode":"totalLiabilities","value":9247000000.0},{"dataCode":"investments","value":835000000.0},{"dataCode":"inventory","value":2577000000.0},{"dataCode":"debtNonCurrent","value":7285000000.0},{"dataCode":"acctRec","value":359000000.0},{"dataCode":"cashAndEq","value":477000000.0},{"dataCode":"assetsCurrent","value":4469000000.0},{"dataCode":"sharesBasic","value":188702603.0},{"dataCode":"ppeq","value":4015000000.0},{"dataCode":"retainedEarnings","value":-1270000000.0},{"dataCode":"debtCurrent","value":788000000.0},{"dataCode":"totalAssets","value":9621000000.0},{"dataCode":"deferredRev","value":0.0},{"dataCode":"investmentsNonCurrent","value":0.0},{"dataCode":"liabilitiesNonCurrent","value":7369000000.0},{"dataCode":"equity","value":274000000.0}],"incomeStatement":[{"dataCode":"costRev","value":3027000000.0},{"dataCode":"shareswaDil","value":105857000.0},{"dataCode":"nonControllingInterests","value":-225000000.0},{"dataCode":"ebt","value":-283000000.0},{"dataCode":"opinc","value":-297000000.0},{"dataCode":"consolidatedIncome","value":-508000000.0},{"dataCode":"netIncDiscOps","value":0.0},{"dataCode":"sga","value":656000000.0},{"dataCode":"rnd","value":0.0},{"dataCode":"ebit","value":-130000000.0},{"dataCode":"epsDil","value":-2.67},{"dataCode":"shareswa","value":105857000.0},{"dataCode":"ebitda","value":-52000000.0},{"dataCode":"prefDVDs","value":0.0},{"dataCode":"netIncComStock","value":-283000000.0},{"dataCode":"netinc","value":-283000000.0},{"dataCode":"eps","value":-2.67},{"dataCode":"grossProfit","value":359000000.0},{"dataCode":"intexp","value":153000000.0},{"dataCode":"revenue","value":3386000000.0},{"dataCode":"opex","value":656000000.0},{"dataCode":"taxExp","value":0.0}],"cashFlow":[{"dataCode":"sbcomp","value":15000000.0},{"dataCode":"ncff","value":-579000000.0},{"dataCode":"businessAcqDisposals","value":0.0},{"dataCode":"ncf","value":-720000000.0},{"dataCode":"investmentsAcqDisposals","value":47000000.0},{"dataCode":"payDiv","value":0.0},{"dataCode":"depamor","value":78000000.0},{"dataCode":"ncfi","value":-43000000.0},{"dataCode":"capex","value":-90000000.0},{"dataCode":"issrepayDebt","value":-579000000.0},{"dataCode":"freeCashFlow","value":-188000000.0},{"dataCode":"ncfo","value":-98000000.0},{"dataCode":"ncfx","value":0.0},{"dataCode":"issrepayEquity","value":1000000.0}],"overview":[{"dataCode":"roe","value":-2.9024186822352},{"dataCode":"shareFactor","value":1.0},{"dataCode":"currentRatio","value":2.37965921192758},{"dataCode":"piotroskiFScore","value":2.0},{"dataCode":"roa","value":-0.100221755032687},{"dataCode":"epsQoQ","value":6.02631578947368},{"dataCode":"debtEquity","value":29.463503649635},{"dataCode":"revenueQoQ","value":-0.0270114942528735},{"dataCode":"profitMargin","value":0.106024808033077},{"dataCode":"rps","value":17.9435786585307},{"dataCode":"grossMargin","value":0.106024808033077},{"dataCode":"longTermDebtEquity","value":26.5875912408759},{"dataCode":"bookVal","value":374000000.0},{"dataCode":"bvps","value":1.98195464214132}]}}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_statement/test_list_statements_unknown.yaml b/tests/cassettes/test_statement/test_list_statements_unknown.yaml index 4685bfc..c06288c 100644 --- a/tests/cassettes/test_statement/test_list_statements_unknown.yaml +++ b/tests/cassettes/test_statement/test_list_statements_unknown.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -43,7 +26,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/data/fundamentals/__X_X/statements?startDate=2022-01-01 response: body: - string: '{"message": "No data returned"}' + string: '{"message":"No data returned"}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_limit_buy.yaml b/tests/cassettes/test_trade/test_limit_buy.yaml index 0952944..be8ed56 100644 --- a/tests/cassettes/test_trade/test_limit_buy.yaml +++ b/tests/cassettes/test_trade/test_limit_buy.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "rita19", "emailAddress": "torresbenjamin@gmail.com", "dw_AccountId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": "w4-1267174s", - "macAccountNumber": "H1-7641957H", "status": null, "macStatus": "BASIC_USER", - "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "lastName": "Alexander", "phoneNumber": "9011530005", - "signUpPhase": 0, "ackSignedWhen": "2021-05-18", "createdDate": 1574303699770, - "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "L7-2127933N", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "mfaenabled": false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","mfaenabled":false}' headers: {} status: code: 200 @@ -45,29 +28,22 @@ interactions: response: body: string: - '{"products": [{"id": "379224d8-3679-439b-b30e-221da5b8d957", "instrumentTypeID": - null, "symbol": "AAPL", "description": "Apple Inc. designs, manufactures and - markets mobile communication and media devices, personal computers and portable - digital music players. The Company sells a range of related software, services, - accessories, networking solutions, and third-party digital content and applications. - The Company''s segments include the Americas, Europe, Greater China, Japan - and Rest of Asia Pacific. The Americas segment includes both North and South - America. The Europe segment includes European countries, India, the Middle - East and Africa. The Greater China segment includes China, Hong Kong and Taiwan. - The Rest of Asia Pacific segment includes Australia and the Asian countries - not included in the Company''s other operating segments. Its products and - services include iPhone, iPad, Mac, iPod, Apple Watch, Apple TV, a portfolio - of consumer and professional software applications, iPhone OS (iOS), OS X - and watchOS operating systems, iCloud, Apple Pay and a range of accessory, - service and support offerings.", "category": "Stock", "currencyID": "USD", - "urlImage": "https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "sector": "Technology", "name": "Apple, Inc.", "dailyReturn": -3.21, "dailyReturnPercentage": - -1.89, "lastTraded": 166.59, "monthlyReturn": 0.0, "yearlyReturnPercentage": - 71.05, "yearlyReturnValue": 50.3, "popularity": 1967.0, "watched": 50595, - "news": 0, "bought": 172965, "viewed": 175200, "productType": "Instrument", - "exchange": null, "status": "ACTIVE", "type": "EQUITY", "encodedName": "apple-inc-aapl", - "period": "YEAR RETURN", "inceptionDate": 345427200000, "instrumentTags": - [], "childInstruments": []}]}' + '{"products":[{"id":"379224d8-3679-439b-b30e-221da5b8d957","instrumentTypeID":null,"symbol":"AAPL","description":"Apple + Inc. designs, manufactures and markets mobile communication and media devices, + personal computers and portable digital music players. The Company sells a + range of related software, services, accessories, networking solutions, and + third-party digital content and applications. The Company''s segments include + the Americas, Europe, Greater China, Japan and Rest of Asia Pacific. The Americas + segment includes both North and South America. The Europe segment includes + European countries, India, the Middle East and Africa. The Greater China segment + includes China, Hong Kong and Taiwan. The Rest of Asia Pacific segment includes + Australia and the Asian countries not included in the Company''s other operating + segments. Its products and services include iPhone, iPad, Mac, iPod, Apple + Watch, Apple TV, a portfolio of consumer and professional software applications, + iPhone OS (iOS), OS X and watchOS operating systems, iCloud, Apple Pay and + a range of accessory, service and support offerings.","category":"Stock","currencyID":"USD","urlImage":"https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF","sector":"Technology","name":"Apple, + Inc.","dailyReturn":-3.21,"dailyReturnPercentage":-1.89,"lastTraded":166.59,"monthlyReturn":0.0,"yearlyReturnPercentage":71.05,"yearlyReturnValue":50.3,"popularity":1967.0,"watched":50595,"news":0,"bought":172965,"viewed":175200,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"apple-inc-aapl","period":"YEAR + RETURN","inceptionDate":345427200000,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -85,15 +61,8 @@ interactions: response: body: string: - '[{"id": "29f24937-e47f-4cdd-8a5a-61fb4e05e07a", "itemId": "a67422af-8504-43df-9e63-7361eb0bd99e", - "name": "Apple, Inc.", "quantity": 1000.0, "lastPx": null, "lastQty": null, - "leavesQty": null, "allocatedQty": null, "amountCash": 0.0, "limitPrice": - null, "stopPrice": null, "effectivePrice": null, "autoStop": 0.0, "commission": - 0.0, "grossTradeAmount": null, "description": null, "insertedDate": 1642680654984, - "updatedDate": 1642680654984, "side": "BUY", "orderRejectReason": null, "orderRejectReasonStake": - null, "errorCode": null, "encodedName": "apple-inc-aapl", "imageURL": "https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "symbol": "AAPL", "dwOrderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderStatus": "NEW", "type": "LIMIT", "category": "limit", "status": 0}]' + '[{"id":"29f24937-e47f-4cdd-8a5a-61fb4e05e07a","itemId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Apple, + Inc.","quantity":1000.0,"lastPx":null,"lastQty":null,"leavesQty":null,"allocatedQty":null,"amountCash":0.0,"limitPrice":null,"stopPrice":null,"effectivePrice":null,"autoStop":0.0,"commission":0.0,"grossTradeAmount":null,"description":null,"insertedDate":1642680654984,"updatedDate":1642680654984,"side":"BUY","orderRejectReason":null,"orderRejectReasonStake":null,"errorCode":null,"encodedName":"apple-inc-aapl","imageURL":"https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF","symbol":"AAPL","dwOrderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderStatus":"NEW","type":"LIMIT","category":"limit","status":0}]' headers: {} status: code: 200 @@ -111,80 +80,36 @@ interactions: response: body: string: - '{"transactions": [{"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 1000.0, "orderCashAmt": 0.0, "side": "B", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0607 Insufficient - funds. JAZQ027598 accountNo=STDR000151 accountCash= 16228.22 totalRequiredEquity= - 460000 commission=0 sumRestingNotional=0 sumRestingComission=0 ordersInStreet=", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 460.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T12:10:56.373Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", - "orderType": "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo - ask + 5 cents. bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": - null, "isoTimeRestingOrderExpires": "2022-04-20T20:00:00.000Z", "limitPrice": - 0.0, "stopPrice": 10.0, "cancelledWhen": null, "executedPrice": null, "commissionDesc": - "Standard Commission", "updatedWhen": "2022-01-20T12:10:53.290Z", "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", "orderType": - "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": "2021-11-25 - 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo ask + 5 cents. - bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": - "2022-04-20T20:00:00.000Z", "limitPrice": 0.0, "stopPrice": 10.0, "cancelledWhen": - null, "executedPrice": null, "commissionDesc": "Standard Commission", "updatedWhen": - "2022-01-20T11:04:07.394Z", "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 1000.0, "orderCashAmt": 0.0, "side": "B", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0607 Insufficient - funds. JASU028125 accountNo=STDR000151 accountCash= 16228.22 totalRequiredEquity= - 460000 commission=0 sumRestingNotional=0 sumRestingComission=0 ordersInStreet=", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 460.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-19T23:47:48.890Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", - "orderType": "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo - ask + 5 cents. bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": - null, "isoTimeRestingOrderExpires": "2022-04-19T20:00:00.000Z", "limitPrice": - 0.0, "stopPrice": 10.0, "cancelledWhen": null, "executedPrice": null, "commissionDesc": - "Standard Commission", "updatedWhen": "2022-01-19T23:47:46.147Z", "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "TQQQ", "cumQty": 0.0, "orderStatus": "0", "orderType": - "3", "orderQty": 98.69975468, "orderCashAmt": 0.0, "side": "S", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "stop-sell-new", "commission": 0.0, - "executedWhen": null, "isoTimeRestingOrderExpires": "2022-04-20T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 63.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": null, "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": "8", "orderType": - "2", "orderQty": 100.0, "orderCashAmt": 0.0, "side": "S", "createdWhen": "2021-11-25 - 19:16:51", "updatedReason": "0105 Order quantity exceeds quantity available - for sale. Cannot SELL SHORT. null", "commission": 0.0, "executedWhen": null, - "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", "limitPrice": 400.0, - "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": null, "commissionDesc": - "Standard Commission", "updatedWhen": "2022-01-19T23:47:50.372Z", "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": "8", "orderType": - "2", "orderQty": 1000.0, "orderCashAmt": 0.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0607 Insufficient funds. JASU028223 - accountNo=STDR000151 accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 - sumRestingNotional=0 sumRestingComission=0 ordersInStreet=", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 460.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T11:04:10.242Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 100.0, "orderCashAmt": 0.0, "side": "S", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0105 Order quantity - exceeds quantity available for sale. Cannot SELL SHORT. null", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 400.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T11:04:12.559Z", - "realizedPL": null}]}' + '{"transactions":[{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":1000.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0607 Insufficient funds. JAZQ027598 accountNo=STDR000151 + accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 sumRestingNotional=0 + sumRestingComission=0 ordersInStreet=","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":460.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T12:10:56.373Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T12:10:53.290Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:07.394Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":1000.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0607 Insufficient funds. JASU028125 accountNo=STDR000151 + accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 sumRestingNotional=0 + sumRestingComission=0 ordersInStreet=","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":460.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:48.890Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-19T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:46.147Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TQQQ","cumQty":"0","orderStatus":"0","orderType":"3","orderQty":98.69975468,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"stop-sell-new","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":63.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":null,"realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":100.0,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0105 Order quantity exceeds quantity available + for sale. Cannot SELL SHORT. null","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":400.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:50.372Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":1000.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0607 Insufficient funds. JASU028223 accountNo=STDR000151 + accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 sumRestingNotional=0 + sumRestingComission=0 ordersInStreet=","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":460.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:10.242Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":100.0,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0105 Order quantity exceeds quantity available + for sale. Cannot SELL SHORT. null","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":400.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:12.559Z","realizedPL":1.0}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_limit_sell.yaml b/tests/cassettes/test_trade/test_limit_sell.yaml index 4a17948..b0364c1 100644 --- a/tests/cassettes/test_trade/test_limit_sell.yaml +++ b/tests/cassettes/test_trade/test_limit_sell.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "rita19", "emailAddress": "torresbenjamin@gmail.com", "dw_AccountId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": "w4-1267174s", - "macAccountNumber": "H1-7641957H", "status": null, "macStatus": "BASIC_USER", - "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "lastName": "Alexander", "phoneNumber": "9011530005", - "signUpPhase": 0, "ackSignedWhen": "2021-05-18", "createdDate": 1574303699770, - "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "L7-2127933N", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "mfaenabled": false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","mfaenabled":false}' headers: {} status: code: 200 @@ -45,29 +28,22 @@ interactions: response: body: string: - '{"products": [{"id": "3cc01718-9c37-4de3-8f1c-b7aa2b758974", "instrumentTypeID": - null, "symbol": "AAPL", "description": "Apple Inc. designs, manufactures and - markets mobile communication and media devices, personal computers and portable - digital music players. The Company sells a range of related software, services, - accessories, networking solutions, and third-party digital content and applications. - The Company''s segments include the Americas, Europe, Greater China, Japan - and Rest of Asia Pacific. The Americas segment includes both North and South - America. The Europe segment includes European countries, India, the Middle - East and Africa. The Greater China segment includes China, Hong Kong and Taiwan. - The Rest of Asia Pacific segment includes Australia and the Asian countries - not included in the Company''s other operating segments. Its products and - services include iPhone, iPad, Mac, iPod, Apple Watch, Apple TV, a portfolio - of consumer and professional software applications, iPhone OS (iOS), OS X - and watchOS operating systems, iCloud, Apple Pay and a range of accessory, - service and support offerings.", "category": "Stock", "currencyID": "USD", - "urlImage": "https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "sector": "Technology", "name": "Apple, Inc.", "dailyReturn": -3.21, "dailyReturnPercentage": - -1.89, "lastTraded": 166.59, "monthlyReturn": 0.0, "yearlyReturnPercentage": - 71.05, "yearlyReturnValue": 50.3, "popularity": 1967.0, "watched": 50595, - "news": 0, "bought": 172965, "viewed": 175200, "productType": "Instrument", - "exchange": null, "status": "ACTIVE", "type": "EQUITY", "encodedName": "apple-inc-aapl", - "period": "YEAR RETURN", "inceptionDate": 345427200000, "instrumentTags": - [], "childInstruments": []}]}' + '{"products":[{"id":"3cc01718-9c37-4de3-8f1c-b7aa2b758974","instrumentTypeID":null,"symbol":"AAPL","description":"Apple + Inc. designs, manufactures and markets mobile communication and media devices, + personal computers and portable digital music players. The Company sells a + range of related software, services, accessories, networking solutions, and + third-party digital content and applications. The Company''s segments include + the Americas, Europe, Greater China, Japan and Rest of Asia Pacific. The Americas + segment includes both North and South America. The Europe segment includes + European countries, India, the Middle East and Africa. The Greater China segment + includes China, Hong Kong and Taiwan. The Rest of Asia Pacific segment includes + Australia and the Asian countries not included in the Company''s other operating + segments. Its products and services include iPhone, iPad, Mac, iPod, Apple + Watch, Apple TV, a portfolio of consumer and professional software applications, + iPhone OS (iOS), OS X and watchOS operating systems, iCloud, Apple Pay and + a range of accessory, service and support offerings.","category":"Stock","currencyID":"USD","urlImage":"https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF","sector":"Technology","name":"Apple, + Inc.","dailyReturn":-3.21,"dailyReturnPercentage":-1.89,"lastTraded":166.59,"monthlyReturn":0.0,"yearlyReturnPercentage":71.05,"yearlyReturnValue":50.3,"popularity":1967.0,"watched":50595,"news":0,"bought":172965,"viewed":175200,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"apple-inc-aapl","period":"YEAR + RETURN","inceptionDate":345427200000,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -85,15 +61,8 @@ interactions: response: body: string: - '[{"id": "172b1d72-bdfd-40e8-a5a5-add224ee69d7", "itemId": "a67422af-8504-43df-9e63-7361eb0bd99e", - "name": "Apple, Inc.", "quantity": 100.0, "lastPx": null, "lastQty": null, - "leavesQty": null, "allocatedQty": null, "amountCash": 0.0, "limitPrice": - null, "stopPrice": null, "effectivePrice": null, "autoStop": null, "commission": - 0.0, "grossTradeAmount": null, "description": null, "insertedDate": 1642680658129, - "updatedDate": 1642680658129, "side": "SELL", "orderRejectReason": null, "orderRejectReasonStake": - null, "errorCode": null, "encodedName": "apple-inc-aapl", "imageURL": "https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "symbol": "AAPL", "dwOrderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderStatus": "NEW", "type": "LIMIT", "category": "limit", "status": 0}]' + '[{"id":"172b1d72-bdfd-40e8-a5a5-add224ee69d7","itemId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Apple, + Inc.","quantity":100.0,"lastPx":null,"lastQty":null,"leavesQty":null,"allocatedQty":null,"amountCash":0.0,"limitPrice":null,"stopPrice":null,"effectivePrice":null,"autoStop":null,"commission":0.0,"grossTradeAmount":null,"description":null,"insertedDate":1642680658129,"updatedDate":1642680658129,"side":"SELL","orderRejectReason":null,"orderRejectReasonStake":null,"errorCode":null,"encodedName":"apple-inc-aapl","imageURL":"https://drivewealth.imgix.net/symbols/aapl.png?fit=fillmax&w=125&h=125&bg=FFFFFF","symbol":"AAPL","dwOrderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderStatus":"NEW","type":"LIMIT","category":"limit","status":0}]' headers: {} status: code: 200 @@ -111,88 +80,39 @@ interactions: response: body: string: - '{"transactions": [{"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 1000.0, "orderCashAmt": 0.0, "side": "B", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0607 Insufficient - funds. JAZQ027598 accountNo=STDR000151 accountCash= 16228.22 totalRequiredEquity= - 460000 commission=0 sumRestingNotional=0 sumRestingComission=0 ordersInStreet=", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 460.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T12:10:56.373Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", - "orderType": "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo - ask + 5 cents. bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": - null, "isoTimeRestingOrderExpires": "2022-04-20T20:00:00.000Z", "limitPrice": - 0.0, "stopPrice": 10.0, "cancelledWhen": null, "executedPrice": null, "commissionDesc": - "Standard Commission", "updatedWhen": "2022-01-20T12:10:53.290Z", "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", "orderType": - "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": "2021-11-25 - 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo ask + 5 cents. - bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": - "2022-04-20T20:00:00.000Z", "limitPrice": 0.0, "stopPrice": 10.0, "cancelledWhen": - null, "executedPrice": null, "commissionDesc": "Standard Commission", "updatedWhen": - "2022-01-20T11:04:07.394Z", "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 1000.0, "orderCashAmt": 0.0, "side": "B", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0607 Insufficient - funds. JASU028125 accountNo=STDR000151 accountCash= 16228.22 totalRequiredEquity= - 460000 commission=0 sumRestingNotional=0 sumRestingComission=0 ordersInStreet=", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 460.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-19T23:47:48.890Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", - "orderType": "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo - ask + 5 cents. bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": - null, "isoTimeRestingOrderExpires": "2022-04-19T20:00:00.000Z", "limitPrice": - 0.0, "stopPrice": 10.0, "cancelledWhen": null, "executedPrice": null, "commissionDesc": - "Standard Commission", "updatedWhen": "2022-01-19T23:47:46.147Z", "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "TQQQ", "cumQty": 0.0, "orderStatus": "0", "orderType": - "3", "orderQty": 98.69975468, "orderCashAmt": 0.0, "side": "S", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "stop-sell-new", "commission": 0.0, - "executedWhen": null, "isoTimeRestingOrderExpires": "2022-04-20T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 63.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": null, "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": "8", "orderType": - "2", "orderQty": 1000.0, "orderCashAmt": 0.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0607 Insufficient funds. JASU028223 - accountNo=STDR000151 accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 - sumRestingNotional=0 sumRestingComission=0 ordersInStreet=", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 460.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T11:04:10.242Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 100.0, "orderCashAmt": 0.0, "side": "S", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0105 Order quantity - exceeds quantity available for sale. Cannot SELL SHORT. null", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 400.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-19T23:47:50.372Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 100.0, "orderCashAmt": 0.0, "side": "S", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0105 Order quantity - exceeds quantity available for sale. Cannot SELL SHORT. null", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 400.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T11:04:12.559Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 100.0, "orderCashAmt": 0.0, "side": "S", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0105 Order quantity - exceeds quantity available for sale. Cannot SELL SHORT. null", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 400.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T12:10:58.304Z", - "realizedPL": null}]}' + '{"transactions":[{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":1000.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0607 Insufficient funds. JAZQ027598 accountNo=STDR000151 + accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 sumRestingNotional=0 + sumRestingComission=0 ordersInStreet=","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":460.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T12:10:56.373Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T12:10:53.290Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:07.394Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":1000.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0607 Insufficient funds. JASU028125 accountNo=STDR000151 + accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 sumRestingNotional=0 + sumRestingComission=0 ordersInStreet=","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":460.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:48.890Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-19T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:46.147Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TQQQ","cumQty":"0","orderStatus":"0","orderType":"3","orderQty":98.69975468,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"stop-sell-new","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":63.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":null,"realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":1000.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0607 Insufficient funds. JASU028223 accountNo=STDR000151 + accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 sumRestingNotional=0 + sumRestingComission=0 ordersInStreet=","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":460.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:10.242Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":100.0,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0105 Order quantity exceeds quantity available + for sale. Cannot SELL SHORT. null","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":400.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:50.372Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":100.0,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0105 Order quantity exceeds quantity available + for sale. Cannot SELL SHORT. null","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":400.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:12.559Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":100.0,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0105 Order quantity exceeds quantity available + for sale. Cannot SELL SHORT. null","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":400.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T12:10:58.304Z","realizedPL":1.0}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_sell[exchange0-request_0].yaml b/tests/cassettes/test_trade/test_sell[exchange0-request_0].yaml index 702bae7..ba349fd 100644 --- a/tests/cassettes/test_trade/test_sell[exchange0-request_0].yaml +++ b/tests/cassettes/test_trade/test_sell[exchange0-request_0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,13 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/singleQuote/COL response: body: - string: - '{"marketStatus": "CLOSED", "lastTradedExchange": "ASX", "symbol": "COL", - "lastTradedTimestamp": 1658988616, "lastTrade": "18.6400", "bid": "18.6300", - "ask": "18.6400", "priorClose": "18.7100", "open": "18.6900", "high": "18.6900", - "low": "18.4900", "pointsChange": "-0.0700", "percentageChange": "-0.37", - "outOfMarketPrice": "18.6400", "outOfMarketQuantity": "848925", "outOfMarketSurplus": - "-56140"}' + string: '{"marketStatus":"CLOSED","lastTradedExchange":"ASX","symbol":"COL","lastTradedTimestamp":1658988616,"lastTrade":"18.6400","bid":"18.6300","ask":"18.6400","priorClose":"18.7100","open":"18.6900","high":"18.6900","low":"18.4900","pointsChange":"-0.0700","percentageChange":"-0.37","outOfMarketPrice":"18.6400","outOfMarketQuantity":"848925","outOfMarketSurplus":"-56140"}' headers: {} status: code: 200 @@ -68,7 +44,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/view/COL response: body: - string: '{"instrumentId": "COL.XAU"}' + string: '{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}' headers: {} status: code: 201 @@ -85,16 +61,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '{"order": {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": - "FINCLEAR", "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4841281, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "SELL", "limitPrice": - 18.63, "validity": "GTC", "validityDate": null, "type": "MARKET_TO_LIMIT", - "placedTimestamp": "2022-07-28T20:49:39.621702", "completedTimestamp": null, - "expiresAt": "2022-08-29T00:00:00", "orderStatus": "STAKE_PENDING_CREATE", - "orderCompletionType": null, "filledUnits": 0, "averagePrice": null, "unitsRemaining": - 20, "estimatedBrokerage": 0.0, "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"SELL","limitPrice":18.63,"validity":"GTC","validityDate":null,"type":"MARKET_TO_LIMIT","placedTimestamp":"2022-07-28T20:49:39.621702","completedTimestamp":null,"expiresAt":"2022-08-29T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 @@ -111,16 +78,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '[{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": "FINCLEAR", - "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4841281, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "SELL", "limitPrice": - 18.63, "validity": "GTC", "validityDate": null, "type": "MARKET_TO_LIMIT", - "placedTimestamp": "2022-07-28T20:49:39.621702", "completedTimestamp": null, - "expiresAt": "2022-08-29T00:00:00", "orderStatus": "STAKE_PENDING_CREATE", - "orderCompletionType": null, "filledUnits": 0, "averagePrice": null, "unitsRemaining": - 20, "estimatedBrokerage": 0.0, "estimatedExchangeFees": 0.0}]' + string: '[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"SELL","limitPrice":18.63,"validity":"GTC","validityDate":null,"type":"MARKET_TO_LIMIT","placedTimestamp":"2022-07-28T20:49:39.621702","completedTimestamp":null,"expiresAt":"2022-08-29T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}]' headers: {} status: code: 200 @@ -137,16 +95,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders/1cf93550-8eb4-4c32-a229-826cf8c1be59/cancel response: body: - string: - '{"order": {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": - "FINCLEAR", "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4841281, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "SELL", "limitPrice": - 18.63, "validity": "GTC", "validityDate": null, "type": "MARKET_TO_LIMIT", - "placedTimestamp": "2022-07-28T20:49:39.621702", "completedTimestamp": null, - "expiresAt": "2022-08-29T00:00:00", "orderStatus": "CLOSED", "orderCompletionType": - "CANCELLED", "filledUnits": 0, "averagePrice": null, "unitsRemaining": 20, - "estimatedBrokerage": 0.0, "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"SELL","limitPrice":18.63,"validity":"GTC","validityDate":null,"type":"MARKET_TO_LIMIT","placedTimestamp":"2022-07-28T20:49:39.621702","completedTimestamp":null,"expiresAt":"2022-08-29T00:00:00","orderStatus":"CLOSED","orderCompletionType":"CANCELLED","filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_sell[exchange1-request_1].yaml b/tests/cassettes/test_trade/test_sell[exchange1-request_1].yaml index f2d6449..8e76b88 100644 --- a/tests/cassettes/test_trade/test_sell[exchange1-request_1].yaml +++ b/tests/cassettes/test_trade/test_sell[exchange1-request_1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,7 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/view/COL response: body: - string: '{"instrumentId": "COL.XAU"}' + string: '{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}' headers: {} status: code: 201 @@ -62,16 +44,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '{"order": {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": - "FINCLEAR", "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4841283, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "SELL", "limitPrice": - 15.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-28T20:49:40.810211", "completedTimestamp": null, "expiresAt": "2022-08-29T00:00:00", - "orderStatus": "STAKE_PENDING_CREATE", "orderCompletionType": null, "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 20, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"SELL","limitPrice":15.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-28T20:49:40.810211","completedTimestamp":null,"expiresAt":"2022-08-29T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 @@ -88,16 +61,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '[{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": "FINCLEAR", - "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4841283, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "SELL", "limitPrice": - 15.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-28T20:49:40.810211", "completedTimestamp": null, "expiresAt": "2022-08-29T00:00:00", - "orderStatus": "STAKE_PENDING_CREATE", "orderCompletionType": null, "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 20, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}]' + string: '[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"SELL","limitPrice":15.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-28T20:49:40.810211","completedTimestamp":null,"expiresAt":"2022-08-29T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}]' headers: {} status: code: 200 @@ -114,16 +78,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders/1cf93550-8eb4-4c32-a229-826cf8c1be59/cancel response: body: - string: - '{"order": {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": - "FINCLEAR", "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4841283, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "SELL", "limitPrice": - 15.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-28T20:49:40.810211", "completedTimestamp": null, "expiresAt": "2022-08-29T00:00:00", - "orderStatus": "CLOSED", "orderCompletionType": "CANCELLED", "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 20, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"SELL","limitPrice":15.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-28T20:49:40.810211","completedTimestamp":null,"expiresAt":"2022-08-29T00:00:00","orderStatus":"CLOSED","orderCompletionType":"CANCELLED","filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_stop_buy.yaml b/tests/cassettes/test_trade/test_stop_buy.yaml index 15e1fae..b2ef4bc 100644 --- a/tests/cassettes/test_trade/test_stop_buy.yaml +++ b/tests/cassettes/test_trade/test_stop_buy.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "rita19", "emailAddress": "torresbenjamin@gmail.com", "dw_AccountId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": "w4-1267174s", - "macAccountNumber": "H1-7641957H", "status": null, "macStatus": "BASIC_USER", - "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Tammy", "lastName": "Alexander", "phoneNumber": "9011530005", - "signUpPhase": 0, "ackSignedWhen": "2021-05-18", "createdDate": 1574303699770, - "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "L7-2127933N", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "mfaenabled": false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","mfaenabled":false}' headers: {} status: code: 200 @@ -45,27 +28,21 @@ interactions: response: body: string: - '{"products": [{"id": "c6477745-9bd3-4200-b409-49056ee810ca", "instrumentTypeID": - null, "symbol": "AMD", "description": "Advanced Micro Devices, Inc. is a global - semiconductor company. The Company is engaged in offering x86 microprocessors, - as standalone devices or as incorporated into an accelerated processing unit - (APU), chipsets, discrete graphics processing units (GPUs) and professional - graphics, and server and embedded processors and semi-custom System-on-Chip - (SoC) products and technology for game consoles. The Company''s segments include - the Computing and Graphics segment, and the Enterprise, Embedded and Semi-Custom - segment. The Computing and Graphics segment primarily includes desktop and - notebook processors and chipsets, discrete GPUs and professional graphics. - The Enterprise, Embedded and Semi-Custom segment primarily includes server - and embedded processors, semi-custom SoC products, development services, technology - for game consoles and licensing portions of its intellectual property portfolio.", - "category": "Stock", "currencyID": "USD", "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/amd.png", - "sector": "Technology", "name": "Advanced Micro Devices, Inc.", "dailyReturn": - -3.41, "dailyReturnPercentage": -2.58, "lastTraded": 128.52, "monthlyReturn": - 0.0, "yearlyReturnPercentage": 73.05, "yearlyReturnValue": 33.15, "popularity": - 800.0, "watched": 20790, "news": 0, "bought": 52423, "viewed": 95400, "productType": - "Instrument", "exchange": null, "status": "ACTIVE", "type": "EQUITY", "encodedName": - "advanced-micro-devices-inc-amd", "period": "YEAR RETURN", "inceptionDate": - 322099200000, "instrumentTags": [], "childInstruments": []}]}' + '{"products":[{"id":"c6477745-9bd3-4200-b409-49056ee810ca","instrumentTypeID":null,"symbol":"AMD","description":"Advanced + Micro Devices, Inc. is a global semiconductor company. The Company is engaged + in offering x86 microprocessors, as standalone devices or as incorporated + into an accelerated processing unit (APU), chipsets, discrete graphics processing + units (GPUs) and professional graphics, and server and embedded processors + and semi-custom System-on-Chip (SoC) products and technology for game consoles. + The Company''s segments include the Computing and Graphics segment, and the + Enterprise, Embedded and Semi-Custom segment. The Computing and Graphics segment + primarily includes desktop and notebook processors and chipsets, discrete + GPUs and professional graphics. The Enterprise, Embedded and Semi-Custom segment + primarily includes server and embedded processors, semi-custom SoC products, + development services, technology for game consoles and licensing portions + of its intellectual property portfolio.","category":"Stock","currencyID":"USD","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/amd.png","sector":"Technology","name":"Advanced + Micro Devices, Inc.","dailyReturn":-3.41,"dailyReturnPercentage":-2.58,"lastTraded":128.52,"monthlyReturn":0.0,"yearlyReturnPercentage":73.05,"yearlyReturnValue":33.15,"popularity":800.0,"watched":20790,"news":0,"bought":52423,"viewed":95400,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"advanced-micro-devices-inc-amd","period":"YEAR + RETURN","inceptionDate":322099200000,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -83,16 +60,8 @@ interactions: response: body: string: - '[{"id": "0c2582b9-1c12-42d2-b53c-ed249a352bae", "itemId": "e9bb06e1-0981-4584-8cf4-18ee9296dcbe", - "name": "Advanced Micro Devices, Inc.", "quantity": null, "lastPx": null, - "lastQty": null, "leavesQty": null, "allocatedQty": null, "amountCash": 10.0, - "limitPrice": null, "stopPrice": null, "effectivePrice": null, "autoStop": - 0.0, "commission": 0.0, "grossTradeAmount": null, "description": null, "insertedDate": - 1642680652083, "updatedDate": 1642680652083, "side": "BUY", "orderRejectReason": - null, "orderRejectReasonStake": null, "errorCode": null, "encodedName": "advanced-micro-devices-inc-amd", - "imageURL": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/amd.png", - "symbol": "AMD", "dwOrderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderStatus": "NEW", "type": "STOP", "status": 0, "category": "stop"}]' + '[{"id":"0c2582b9-1c12-42d2-b53c-ed249a352bae","itemId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Advanced + Micro Devices, Inc.","quantity":null,"lastPx":null,"lastQty":null,"leavesQty":null,"allocatedQty":null,"amountCash":10.0,"limitPrice":null,"stopPrice":null,"effectivePrice":null,"autoStop":0.0,"commission":0.0,"grossTradeAmount":null,"description":null,"insertedDate":1642680652083,"updatedDate":1642680652083,"side":"BUY","orderRejectReason":null,"orderRejectReasonStake":null,"errorCode":null,"encodedName":"advanced-micro-devices-inc-amd","imageURL":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/amd.png","symbol":"AMD","dwOrderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderStatus":"NEW","type":"STOP","status":0,"category":"stop"}]' headers: {} status: code: 200 @@ -110,71 +79,32 @@ interactions: response: body: string: - '{"transactions": [{"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", - "orderType": "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo - ask + 5 cents. bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": - null, "isoTimeRestingOrderExpires": "2022-04-20T20:00:00.000Z", "limitPrice": - 0.0, "stopPrice": 10.0, "cancelledWhen": null, "executedPrice": null, "commissionDesc": - "Standard Commission", "updatedWhen": "2022-01-20T12:10:53.290Z", "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", "orderType": - "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": "2021-11-25 - 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo ask + 5 cents. - bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": - "2022-04-20T20:00:00.000Z", "limitPrice": 0.0, "stopPrice": 10.0, "cancelledWhen": - null, "executedPrice": null, "commissionDesc": "Standard Commission", "updatedWhen": - "2022-01-20T11:04:07.394Z", "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 1000.0, "orderCashAmt": 0.0, "side": "B", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0607 Insufficient - funds. JASU028125 accountNo=STDR000151 accountCash= 16228.22 totalRequiredEquity= - 460000 commission=0 sumRestingNotional=0 sumRestingComission=0 ordersInStreet=", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 460.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-19T23:47:48.890Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AMD", "cumQty": 0.0, "orderStatus": "8", - "orderType": "3", "orderQty": 0.0, "orderCashAmt": 10.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0121 Buy Stop price must be >= nbbo - ask + 5 cents. bid:128.27 ask:128.27", "commission": 0.0, "executedWhen": - null, "isoTimeRestingOrderExpires": "2022-04-19T20:00:00.000Z", "limitPrice": - 0.0, "stopPrice": 10.0, "cancelledWhen": null, "executedPrice": null, "commissionDesc": - "Standard Commission", "updatedWhen": "2022-01-19T23:47:46.147Z", "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "TQQQ", "cumQty": 0.0, "orderStatus": "0", "orderType": - "3", "orderQty": 98.69975468, "orderCashAmt": 0.0, "side": "S", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "stop-sell-new", "commission": 0.0, - "executedWhen": null, "isoTimeRestingOrderExpires": "2022-04-20T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 63.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": null, "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": "8", "orderType": - "2", "orderQty": 100.0, "orderCashAmt": 0.0, "side": "S", "createdWhen": "2021-11-25 - 19:16:51", "updatedReason": "0105 Order quantity exceeds quantity available - for sale. Cannot SELL SHORT. null", "commission": 0.0, "executedWhen": null, - "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", "limitPrice": 400.0, - "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": null, "commissionDesc": - "Standard Commission", "updatedWhen": "2022-01-19T23:47:50.372Z", "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": "8", "orderType": - "2", "orderQty": 1000.0, "orderCashAmt": 0.0, "side": "B", "createdWhen": - "2021-11-25 19:16:51", "updatedReason": "0607 Insufficient funds. JASU028223 - accountNo=STDR000151 accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 - sumRestingNotional=0 sumRestingComission=0 ordersInStreet=", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 460.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T11:04:10.242Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "S2-9425658g", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "8", "orderType": "2", "orderQty": 100.0, "orderCashAmt": 0.0, "side": "S", - "createdWhen": "2021-11-25 19:16:51", "updatedReason": "0105 Order quantity - exceeds quantity available for sale. Cannot SELL SHORT. null", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-01-20T21:00:00.000Z", - "limitPrice": 400.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-01-20T11:04:12.559Z", - "realizedPL": null}]}' + '{"transactions":[{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T12:10:53.290Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:07.394Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":1000.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0607 Insufficient funds. JASU028125 accountNo=STDR000151 + accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 sumRestingNotional=0 + sumRestingComission=0 ordersInStreet=","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":460.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:48.890Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AMD","cumQty":"0","orderStatus":"8","orderType":"3","orderQty":0.0,"orderCashAmt":10.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0121 Buy Stop price must be >= nbbo ask + 5 cents. + bid:128.27 ask:128.27","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-19T20:00:00.000Z","limitPrice":0.0,"stopPrice":10.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:46.147Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TQQQ","cumQty":"0","orderStatus":"0","orderType":"3","orderQty":98.69975468,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"stop-sell-new","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-04-20T20:00:00.000Z","limitPrice":0.0,"stopPrice":63.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":null,"realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":100.0,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0105 Order quantity exceeds quantity available + for sale. Cannot SELL SHORT. null","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":400.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-19T23:47:50.372Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":1000.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0607 Insufficient funds. JASU028223 accountNo=STDR000151 + accountCash= 16228.22 totalRequiredEquity= 460000 commission=0 sumRestingNotional=0 + sumRestingComission=0 ordersInStreet=","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":460.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:10.242Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"8","orderType":"2","orderQty":100.0,"orderCashAmt":0.0,"side":"S","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"0105 Order quantity exceeds quantity available + for sale. Cannot SELL SHORT. null","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-01-20T21:00:00.000Z","limitPrice":400.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-01-20T11:04:12.559Z","realizedPL":1.0}]}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_successful_trade[exchange0-request_0].yaml b/tests/cassettes/test_trade/test_successful_trade[exchange0-request_0].yaml index cb76942..4864c0f 100644 --- a/tests/cassettes/test_trade/test_successful_trade[exchange0-request_0].yaml +++ b/tests/cassettes/test_trade/test_successful_trade[exchange0-request_0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,28 +28,21 @@ interactions: response: body: string: - '{"products": [{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "instrumentTypeID": - null, "symbol": "TSLA", "description": "Tesla, Inc. designs, develops, manufactures - and sells electric vehicles and designs, manufactures, installs and sells - solar energy generation and energy storage products. The Company''s segments - include automotive, and energy generation and storage. The automotive segment - includes the design, development, manufacturing, sales and leasing of electric - vehicles as well as sales of automotive regulatory credits. The energy generation - and storage segment include the design, manufacture, installation, sales and - leasing of solar energy generation and energy storage products, services related - to its products, and sales of solar energy system incentives. Its automotive - products include Model 3, Model Y, Model S and Model X. Model 3 is a four-door - sedan. Model Y is a sport utility vehicle (SUV) built on the Model 3 platform. - Model S is a four-door sedan. Model X is an SUV. Its energy storage products - include Powerwall and Powerpack.", "category": "Stock", "currencyID": "USD", - "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png", - "sector": "Consumer Cyclical", "name": "Tesla, Inc.", "dailyReturn": -27.61, - "dailyReturnPercentage": -3.43, "lastTraded": 777.69, "monthlyReturn": 0.0, - "yearlyReturnPercentage": 421.89, "yearlyReturnValue": 544.51, "popularity": - 17753.0, "watched": 74328, "news": 0, "bought": 447958, "viewed": 477900, - "productType": "Instrument", "exchange": null, "status": "ACTIVE", "type": - "EQUITY", "encodedName": "tesla-inc-tsla", "period": "YEAR RETURN", "inceptionDate": - 1277769600000, "instrumentTags": [], "childInstruments": []}]}' + '{"products":[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentTypeID":null,"symbol":"TSLA","description":"Tesla, + Inc. designs, develops, manufactures and sells electric vehicles and designs, + manufactures, installs and sells solar energy generation and energy storage + products. The Company''s segments include automotive, and energy generation + and storage. The automotive segment includes the design, development, manufacturing, + sales and leasing of electric vehicles as well as sales of automotive regulatory + credits. The energy generation and storage segment include the design, manufacture, + installation, sales and leasing of solar energy generation and energy storage + products, services related to its products, and sales of solar energy system + incentives. Its automotive products include Model 3, Model Y, Model S and + Model X. Model 3 is a four-door sedan. Model Y is a sport utility vehicle + (SUV) built on the Model 3 platform. Model S is a four-door sedan. Model X + is an SUV. Its energy storage products include Powerwall and Powerpack.","category":"Stock","currencyID":"USD","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png","sector":"Consumer + Cyclical","name":"Tesla, Inc.","dailyReturn":-27.61,"dailyReturnPercentage":-3.43,"lastTraded":777.69,"monthlyReturn":0.0,"yearlyReturnPercentage":421.89,"yearlyReturnValue":544.51,"popularity":17753.0,"watched":74328,"news":0,"bought":447958,"viewed":477900,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"tesla-inc-tsla","period":"YEAR + RETURN","inceptionDate":1277769600000,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -85,16 +60,8 @@ interactions: response: body: string: - '[{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "itemId": "5b85fabb-d57c-44e6-a7f6-a3efc760226c", - "name": "Tesla, Inc.", "quantity": null, "lastPx": null, "lastQty": null, - "leavesQty": null, "allocatedQty": null, "amountCash": 20.0, "limitPrice": - null, "stopPrice": null, "effectivePrice": null, "autoStop": 0.0, "commission": - 0.0, "grossTradeAmount": null, "description": null, "insertedDate": 1658924561819, - "updatedDate": 1658924561819, "side": "BUY", "orderRejectReason": null, "orderRejectReasonStake": - null, "errorCode": null, "encodedName": "tesla-inc-tsla", "imageURL": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png", - "symbol": "TSLA", "dwOrderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderStatus": "NEW", "type": "MARKET", "timeInForce": "GFD", "expiration": - null, "status": 0, "category": "market"}]' + '[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","itemId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Tesla, + Inc.","quantity":null,"lastPx":null,"lastQty":null,"leavesQty":null,"allocatedQty":null,"amountCash":20.0,"limitPrice":null,"stopPrice":null,"effectivePrice":null,"autoStop":0.0,"commission":0.0,"grossTradeAmount":null,"description":null,"insertedDate":1658924561819,"updatedDate":1658924561819,"side":"BUY","orderRejectReason":null,"orderRejectReasonStake":null,"errorCode":null,"encodedName":"tesla-inc-tsla","imageURL":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png","symbol":"TSLA","dwOrderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderStatus":"NEW","type":"MARKET","timeInForce":"GFD","expiration":null,"status":0,"category":"market"}]' headers: {} status: code: 200 @@ -112,77 +79,27 @@ interactions: response: body: string: - '{"transactions": [{"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.02526847, "orderCashAmt": 20.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:17:54.074Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TQQQ", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 3.52112676, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:12:15.826Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.02529916, "orderCashAmt": 20.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:11:56.996Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.02528508, "orderCashAmt": 20.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:02:10.256Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.65410779, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T11:22:22.271Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.65410779, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T11:21:04.186Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.65440743, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T11:18:45.019Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.65466448, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T11:15:22.321Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "0", "orderType": "1", "orderQty": 0.02523818, "orderCashAmt": 20.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "market_order-buy-new", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": null, "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": "4", "orderType": - "1", "orderQty": 1.30984347, "orderCashAmt": 200.0, "side": "B", "createdWhen": - "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", "commission": 0.0, - "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:12:10.007Z", - "realizedPL": null}]}' + '{"transactions":[{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.02526847,"orderCashAmt":20.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:17:54.074Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TQQQ","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":3.52112676,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:12:15.826Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.02529916,"orderCashAmt":20.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:11:56.996Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.02528508,"orderCashAmt":20.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:02:10.256Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.65410779,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T11:22:22.271Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.65410779,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T11:21:04.186Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.65440743,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T11:18:45.019Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.65466448,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T11:15:22.321Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"0","orderType":"1","orderQty":0.02523818,"orderCashAmt":20.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"market_order-buy-new","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":null,"realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":1.30984347,"orderCashAmt":200.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:12:10.007Z","realizedPL":1.0}]}' headers: {} status: code: 200 @@ -200,14 +117,9 @@ interactions: response: body: string: - '[{"orderNo": "x5-4334954E", "orderID": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderCashAmt": 20.0, "symbol": "TSLA", "price": 0.0, "stopPrice": 0.0, "side": - "B", "orderType": 1, "cumQty": "0.0", "limitPrice": 0.0, "commission": 0.0, - "createdWhen": "2021-07-04 21:46:25", "orderStatus": 0, "orderQty": 0.02523818, - "description": "Market Order", "instrumentID": "5b85fabb-d57c-44e6-a7f6-a3efc760226c", - "imageUrl": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png", - "instrumentSymbol": "TSLA", "instrumentName": "Tesla, Inc.", "encodedName": - "tesla-inc-tsla", "expires": "2022-07-27"}]' + '[{"orderNo":"Z5-3001375g","orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderCashAmt":20.0,"symbol":"TSLA","price":0.0,"stopPrice":0.0,"side":"B","orderType":1,"cumQty":"0","limitPrice":0.0,"commission":0.0,"createdWhen":"2022-02-15 + 04:31:52","orderStatus":0,"orderQty":0.02523818,"description":"Market Order","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png","instrumentSymbol":"TSLA","instrumentName":"Tesla, + Inc.","encodedName":"tesla-inc-tsla","expires":"2022-07-27"}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_successful_trade[exchange1-request_1].yaml b/tests/cassettes/test_trade/test_successful_trade[exchange1-request_1].yaml index ee62974..de3b423 100644 --- a/tests/cassettes/test_trade/test_successful_trade[exchange1-request_1].yaml +++ b/tests/cassettes/test_trade/test_successful_trade[exchange1-request_1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,13 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/singleQuote/COL response: body: - string: - '{"marketStatus": "CLOSED", "lastTradedExchange": "ASX", "symbol": "COL", - "lastTradedTimestamp": 1658902258, "lastTrade": "18.7100", "bid": "18.7100", - "ask": "18.7200", "priorClose": "18.7800", "open": "18.8900", "high": "18.9400", - "low": "18.6400", "pointsChange": "-0.0700", "percentageChange": "-0.37", - "outOfMarketPrice": "18.7100", "outOfMarketQuantity": "652055", "outOfMarketSurplus": - "38105"}' + string: '{"marketStatus":"CLOSED","lastTradedExchange":"ASX","symbol":"COL","lastTradedTimestamp":1658902258,"lastTrade":"18.7100","bid":"18.7100","ask":"18.7200","priorClose":"18.7800","open":"18.8900","high":"18.9400","low":"18.6400","pointsChange":"-0.0700","percentageChange":"-0.37","outOfMarketPrice":"18.7100","outOfMarketQuantity":"652055","outOfMarketSurplus":"38105"}' headers: {} status: code: 200 @@ -68,7 +44,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/view/COL response: body: - string: '{"instrumentId": "COL.XAU"}' + string: '{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}' headers: {} status: code: 201 @@ -85,16 +61,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '{"order": {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": - "FINCLEAR", "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4816685, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "BUY", "limitPrice": - 18.72, "validity": "GTC", "validityDate": null, "type": "MARKET_TO_LIMIT", - "placedTimestamp": "2022-07-27T22:22:45.164059", "completedTimestamp": null, - "expiresAt": "2022-08-26T00:00:00", "orderStatus": "STAKE_PENDING_CREATE", - "orderCompletionType": null, "filledUnits": 0, "averagePrice": null, "unitsRemaining": - 20, "estimatedBrokerage": 0.0, "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"BUY","limitPrice":18.72,"validity":"GTC","validityDate":null,"type":"MARKET_TO_LIMIT","placedTimestamp":"2022-07-27T22:22:45.164059","completedTimestamp":null,"expiresAt":"2022-08-26T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 @@ -111,16 +78,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '[{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": "FINCLEAR", - "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4816685, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "BUY", "limitPrice": - 18.72, "validity": "GTC", "validityDate": null, "type": "MARKET_TO_LIMIT", - "placedTimestamp": "2022-07-27T22:22:45.164059", "completedTimestamp": null, - "expiresAt": "2022-08-26T00:00:00", "orderStatus": "STAKE_PENDING_CREATE", - "orderCompletionType": null, "filledUnits": 0, "averagePrice": null, "unitsRemaining": - 20, "estimatedBrokerage": 0.0, "estimatedExchangeFees": 0.0}]' + string: '[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"BUY","limitPrice":18.72,"validity":"GTC","validityDate":null,"type":"MARKET_TO_LIMIT","placedTimestamp":"2022-07-27T22:22:45.164059","completedTimestamp":null,"expiresAt":"2022-08-26T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}]' headers: {} status: code: 200 @@ -137,16 +95,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders/1cf93550-8eb4-4c32-a229-826cf8c1be59/cancel response: body: - string: - '{"order": {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": - "FINCLEAR", "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4816685, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "BUY", "limitPrice": - 18.72, "validity": "GTC", "validityDate": null, "type": "MARKET_TO_LIMIT", - "placedTimestamp": "2022-07-27T22:22:45.164059", "completedTimestamp": null, - "expiresAt": "2022-08-26T00:00:00", "orderStatus": "CLOSED", "orderCompletionType": - "CANCELLED", "filledUnits": 0, "averagePrice": null, "unitsRemaining": 20, - "estimatedBrokerage": 0.0, "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"BUY","limitPrice":18.72,"validity":"GTC","validityDate":null,"type":"MARKET_TO_LIMIT","placedTimestamp":"2022-07-27T22:22:45.164059","completedTimestamp":null,"expiresAt":"2022-08-26T00:00:00","orderStatus":"CLOSED","orderCompletionType":"CANCELLED","filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_successful_trade[exchange2-request_2].yaml b/tests/cassettes/test_trade/test_successful_trade[exchange2-request_2].yaml index 45c3698..f8ff8e3 100644 --- a/tests/cassettes/test_trade/test_successful_trade[exchange2-request_2].yaml +++ b/tests/cassettes/test_trade/test_successful_trade[exchange2-request_2].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,28 +28,21 @@ interactions: response: body: string: - '{"products": [{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "instrumentTypeID": - null, "symbol": "TSLA", "description": "Tesla, Inc. designs, develops, manufactures - and sells electric vehicles and designs, manufactures, installs and sells - solar energy generation and energy storage products. The Company''s segments - include automotive, and energy generation and storage. The automotive segment - includes the design, development, manufacturing, sales and leasing of electric - vehicles as well as sales of automotive regulatory credits. The energy generation - and storage segment include the design, manufacture, installation, sales and - leasing of solar energy generation and energy storage products, services related - to its products, and sales of solar energy system incentives. Its automotive - products include Model 3, Model Y, Model S and Model X. Model 3 is a four-door - sedan. Model Y is a sport utility vehicle (SUV) built on the Model 3 platform. - Model S is a four-door sedan. Model X is an SUV. Its energy storage products - include Powerwall and Powerpack.", "category": "Stock", "currencyID": "USD", - "urlImage": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png", - "sector": "Consumer Cyclical", "name": "Tesla, Inc.", "dailyReturn": -27.61, - "dailyReturnPercentage": -3.43, "lastTraded": 777.69, "monthlyReturn": 0.0, - "yearlyReturnPercentage": 421.89, "yearlyReturnValue": 544.51, "popularity": - 17753.0, "watched": 74328, "news": 0, "bought": 447958, "viewed": 477900, - "productType": "Instrument", "exchange": null, "status": "ACTIVE", "type": - "EQUITY", "encodedName": "tesla-inc-tsla", "period": "YEAR RETURN", "inceptionDate": - 1277769600000, "instrumentTags": [], "childInstruments": []}]}' + '{"products":[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentTypeID":null,"symbol":"TSLA","description":"Tesla, + Inc. designs, develops, manufactures and sells electric vehicles and designs, + manufactures, installs and sells solar energy generation and energy storage + products. The Company''s segments include automotive, and energy generation + and storage. The automotive segment includes the design, development, manufacturing, + sales and leasing of electric vehicles as well as sales of automotive regulatory + credits. The energy generation and storage segment include the design, manufacture, + installation, sales and leasing of solar energy generation and energy storage + products, services related to its products, and sales of solar energy system + incentives. Its automotive products include Model 3, Model Y, Model S and + Model X. Model 3 is a four-door sedan. Model Y is a sport utility vehicle + (SUV) built on the Model 3 platform. Model S is a four-door sedan. Model X + is an SUV. Its energy storage products include Powerwall and Powerpack.","category":"Stock","currencyID":"USD","urlImage":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png","sector":"Consumer + Cyclical","name":"Tesla, Inc.","dailyReturn":-27.61,"dailyReturnPercentage":-3.43,"lastTraded":777.69,"monthlyReturn":0.0,"yearlyReturnPercentage":421.89,"yearlyReturnValue":544.51,"popularity":17753.0,"watched":74328,"news":0,"bought":447958,"viewed":477900,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"tesla-inc-tsla","period":"YEAR + RETURN","inceptionDate":1277769600000,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -85,16 +60,8 @@ interactions: response: body: string: - '[{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "itemId": "5b85fabb-d57c-44e6-a7f6-a3efc760226c", - "name": "Tesla, Inc.", "quantity": 1.0, "lastPx": null, "lastQty": null, "leavesQty": - null, "allocatedQty": null, "amountCash": 0.0, "limitPrice": null, "stopPrice": - null, "effectivePrice": null, "autoStop": 0.0, "commission": 0.0, "grossTradeAmount": - null, "description": null, "insertedDate": 1658924566014, "updatedDate": 1658924566014, - "side": "BUY", "orderRejectReason": null, "orderRejectReasonStake": null, - "errorCode": null, "encodedName": "tesla-inc-tsla", "imageURL": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png", - "symbol": "TSLA", "dwOrderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderStatus": "NEW", "type": "LIMIT", "timeInForce": "GFD", "expiration": - null, "status": 0, "category": "limit"}]' + '[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","itemId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Tesla, + Inc.","quantity":1.0,"lastPx":null,"lastQty":null,"leavesQty":null,"allocatedQty":null,"amountCash":0.0,"limitPrice":null,"stopPrice":null,"effectivePrice":null,"autoStop":0.0,"commission":0.0,"grossTradeAmount":null,"description":null,"insertedDate":1658924566014,"updatedDate":1658924566014,"side":"BUY","orderRejectReason":null,"orderRejectReasonStake":null,"errorCode":null,"encodedName":"tesla-inc-tsla","imageURL":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png","symbol":"TSLA","dwOrderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderStatus":"NEW","type":"LIMIT","timeInForce":"GFD","expiration":null,"status":0,"category":"limit"}]' headers: {} status: code: 200 @@ -112,84 +79,29 @@ interactions: response: body: string: - '{"transactions": [{"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.02526847, "orderCashAmt": 20.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:17:54.074Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TQQQ", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 3.52112676, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:12:15.826Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.02528508, "orderCashAmt": 20.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:02:10.256Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.65410779, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T11:22:22.271Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.65410779, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T11:21:04.186Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.65466448, "orderCashAmt": 100.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T11:15:22.321Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "0", "orderType": "2", "orderQty": 1.0, "orderCashAmt": 0.0, "side": "B", - "createdWhen": "2021-07-04 21:46:25", "updatedReason": "limit-buy-new", "commission": - 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 120.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": null, "realizedPL": - null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": - "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": "4", "orderType": - "1", "orderQty": 0.65440743, "orderCashAmt": 100.0, "side": "B", "createdWhen": - "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", "commission": 0.0, - "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T11:18:45.019Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.02529916, "orderCashAmt": 20.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:11:56.996Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "TSLA", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 0.02523818, "orderCashAmt": 20.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:22:44.363Z", - "realizedPL": null}, {"orderId": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E", "symbol": "AAPL", "cumQty": 0.0, "orderStatus": - "4", "orderType": "1", "orderQty": 1.30984347, "orderCashAmt": 200.0, "side": - "B", "createdWhen": "2021-07-04 21:46:25", "updatedReason": "JOS TS CXL ", - "commission": 0.0, "executedWhen": null, "isoTimeRestingOrderExpires": "2022-07-27T20:00:00.000Z", - "limitPrice": 0.0, "stopPrice": 0.0, "cancelledWhen": null, "executedPrice": - null, "commissionDesc": "Standard Commission", "updatedWhen": "2022-07-27T12:12:10.007Z", - "realizedPL": null}]}' + '{"transactions":[{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.02526847,"orderCashAmt":20.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:17:54.074Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TQQQ","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":3.52112676,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:12:15.826Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.02528508,"orderCashAmt":20.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:02:10.256Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.65410779,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T11:22:22.271Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.65410779,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T11:21:04.186Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.65466448,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T11:15:22.321Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"0","orderType":"2","orderQty":1.0,"orderCashAmt":0.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"limit-buy-new","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":120.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":null,"realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.65440743,"orderCashAmt":100.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T11:18:45.019Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.02529916,"orderCashAmt":20.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:11:56.996Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"TSLA","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":0.02523818,"orderCashAmt":20.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:22:44.363Z","realizedPL":1.0},{"orderId":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g","symbol":"AAPL","cumQty":"0","orderStatus":"4","orderType":"1","orderQty":1.30984347,"orderCashAmt":200.0,"side":"B","createdWhen":"2022-02-15 + 04:31:52","updatedReason":"JOS TS CXL ","commission":0.0,"executedWhen":null,"isoTimeRestingOrderExpires":"2022-07-27T20:00:00.000Z","limitPrice":0.0,"stopPrice":0.0,"cancelledWhen":null,"executedPrice":null,"commissionDesc":"Standard + Commission","updatedWhen":"2022-07-27T12:12:10.007Z","realizedPL":1.0}]}' headers: {} status: code: 200 @@ -207,14 +119,10 @@ interactions: response: body: string: - '[{"orderNo": "x5-4334954E", "orderID": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderCashAmt": 0.0, "symbol": "TSLA", "price": 0.0, "stopPrice": 0.0, "side": - "B", "orderType": 2, "cumQty": "0.0", "limitPrice": 120.0, "commission": 0.0, - "createdWhen": "2021-07-04 21:46:25", "orderStatus": 0, "orderQty": 1.0, "description": - "Limit Order: Buy at a limit of $120.00", "instrumentID": "5b85fabb-d57c-44e6-a7f6-a3efc760226c", - "imageUrl": "https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png", - "instrumentSymbol": "TSLA", "instrumentName": "Tesla, Inc.", "encodedName": - "tesla-inc-tsla", "expires": "2022-07-27"}]' + '[{"orderNo":"Z5-3001375g","orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderCashAmt":0.0,"symbol":"TSLA","price":0.0,"stopPrice":0.0,"side":"B","orderType":2,"cumQty":"0","limitPrice":120.0,"commission":0.0,"createdWhen":"2022-02-15 + 04:31:52","orderStatus":0,"orderQty":1.0,"description":"Limit Order: Buy at + a limit of $120.00","instrumentID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","imageUrl":"https://d3an3cesqmrf1x.cloudfront.net/images/symbols/tsla.png","instrumentSymbol":"TSLA","instrumentName":"Tesla, + Inc.","encodedName":"tesla-inc-tsla","expires":"2022-07-27"}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_trade/test_successful_trade[exchange3-request_3].yaml b/tests/cassettes/test_trade/test_successful_trade[exchange3-request_3].yaml index 6353a75..fd76231 100644 --- a/tests/cassettes/test_trade/test_successful_trade[exchange3-request_3].yaml +++ b/tests/cassettes/test_trade/test_successful_trade[exchange3-request_3].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,7 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/view/COL response: body: - string: '{"instrumentId": "COL.XAU"}' + string: '{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}' headers: {} status: code: 201 @@ -62,16 +44,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '{"order": {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": - "FINCLEAR", "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4816686, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "BUY", "limitPrice": - 12.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-27T22:22:49.881946", "completedTimestamp": null, "expiresAt": "2022-08-26T00:00:00", - "orderStatus": "STAKE_PENDING_CREATE", "orderCompletionType": null, "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 20, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"BUY","limitPrice":12.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-27T22:22:49.881946","completedTimestamp":null,"expiresAt":"2022-08-26T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 @@ -88,16 +61,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders response: body: - string: - '[{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": "FINCLEAR", - "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4816686, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "BUY", "limitPrice": - 12.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-27T22:22:49.881946", "completedTimestamp": null, "expiresAt": "2022-08-26T00:00:00", - "orderStatus": "STAKE_PENDING_CREATE", "orderCompletionType": null, "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 20, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}]' + string: '[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"BUY","limitPrice":12.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-27T22:22:49.881946","completedTimestamp":null,"expiresAt":"2022-08-26T00:00:00","orderStatus":"STAKE_PENDING_CREATE","orderCompletionType":null,"filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}]' headers: {} status: code: 200 @@ -114,16 +78,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders/1cf93550-8eb4-4c32-a229-826cf8c1be59/cancel response: body: - string: - '{"order": {"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "broker": - "FINCLEAR", "brokerOrderId": 11111, "brokerOrderVersionId": null, "brokerInstructionId": - 4816686, "brokerInstructionVersionId": 2, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "instrumentId": null, "instrumentCode": "COL.XAU", "side": "BUY", "limitPrice": - 12.0, "validity": "GTC", "validityDate": null, "type": "LIMIT", "placedTimestamp": - "2022-07-27T22:22:49.881946", "completedTimestamp": null, "expiresAt": "2022-08-26T00:00:00", - "orderStatus": "CLOSED", "orderCompletionType": "CANCELLED", "filledUnits": - 0, "averagePrice": null, "unitsRemaining": 20, "estimatedBrokerage": 0.0, - "estimatedExchangeFees": 0.0}}' + string: '{"order":{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","broker":"FINCLEAR","brokerOrderId":11111,"brokerOrderVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","brokerInstructionVersionId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentCode":"COL.XAU","side":"BUY","limitPrice":12.0,"validity":"GTC","validityDate":null,"type":"LIMIT","placedTimestamp":"2022-07-27T22:22:49.881946","completedTimestamp":null,"expiresAt":"2022-08-26T00:00:00","orderStatus":"CLOSED","orderCompletionType":"CANCELLED","filledUnits":0,"averagePrice":null,"unitsRemaining":20,"estimatedBrokerage":0.0,"estimatedExchangeFees":0.0}}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_transaction/test_list_transactions[exchange0-request_0].yaml b/tests/cassettes/test_transaction/test_list_transactions[exchange0-request_0].yaml index 56ef607..810e158 100644 --- a/tests/cassettes/test_transaction/test_list_transactions[exchange0-request_0].yaml +++ b/tests/cassettes/test_transaction/test_list_transactions[exchange0-request_0].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -46,38 +28,11 @@ interactions: response: body: string: - '[{"accountAmount": 0.62, "accountBalance": 29442.32, "accountType": - "LIVE", "comment": "f1-9011914a", "dnb": false, "finTranID": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "finTranTypeID": "DIV", "feeSec": 0.0, "feeTaf": 0.0, "feeBase": 0.0, "feeXtraShares": - 0.0, "feeExchange": 0.0, "fillQty": 0.0, "fillPx": 0.0, "sendCommissionToInteliclear": - false, "systemAmount": 0.0, "tranAmount": 1000, "tranSource": "INTE", "tranWhen": - "2020-06-09 03:35:08", "wlpAmount": 0.0, "wlpFinTranTypeID": "b553ef2c-13f8-411b-977c-00fbc5efbe59", - "instrument": {"id": "20076f7d-ff21-4741-86be-33dac978ceff", "symbol": "LIT", - "name": "Global X Lithium & Battery Tech ETF"}, "dividend": {"type": "CASH", - "amountPerShare": 0.0622, "taxCode": "FULLY_TAXABLE"}, "dividendTax": null, - "mergerAcquisition": null, "positionDelta": null, "orderID": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E"}, {"accountAmount": 3.5, "accountBalance": 29445.82, - "accountType": "LIVE", "comment": "f1-9011914a", "dnb": false, "finTranID": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "finTranTypeID": "DIV", "feeSec": - 0.0, "feeTaf": 0.0, "feeBase": 0.0, "feeXtraShares": 0.0, "feeExchange": 0.0, - "fillQty": 0.0, "fillPx": 0.0, "sendCommissionToInteliclear": false, "systemAmount": - 0.0, "tranAmount": 1000, "tranSource": "INTE", "tranWhen": "2020-06-09 03:35:08", - "wlpAmount": 0.0, "wlpFinTranTypeID": "b553ef2c-13f8-411b-977c-00fbc5efbe59", - "instrument": {"id": "20076f7d-ff21-4741-86be-33dac978ceff", "symbol": "COP", - "name": "ConocoPhillips"}, "dividend": {"type": "CASH", "amountPerShare": - 0.7, "taxCode": "FULLY_TAXABLE"}, "dividendTax": null, "mergerAcquisition": - null, "positionDelta": null, "orderID": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", - "orderNo": "x5-4334954E"}, {"accountAmount": -0.53, "accountBalance": 29445.29, - "accountType": "LIVE", "comment": "f1-9011914a", "dnb": false, "finTranID": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "finTranTypeID": "DIVTAX", "feeSec": - 0.0, "feeTaf": 0.0, "feeBase": 0.0, "feeXtraShares": 0.0, "feeExchange": 0.0, - "fillQty": 0.0, "fillPx": 0.0, "sendCommissionToInteliclear": false, "systemAmount": - 0.0, "tranAmount": 1000, "tranSource": "INTE", "tranWhen": "2020-06-09 03:35:08", - "wlpAmount": 0.0, "wlpFinTranTypeID": "87f1acf2-b9ea-4781-b989-e403459626bb", - "instrument": {"id": "20076f7d-ff21-4741-86be-33dac978ceff", "symbol": "COP", - "name": "ConocoPhillips"}, "dividend": null, "dividendTax": {"rate": 0.15, - "type": "NON_RESIDENT_ALIEN"}, "mergerAcquisition": null, "positionDelta": - null, "orderID": "HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59", "orderNo": "x5-4334954E"}]' + '[{"accountAmount":1.0,"accountBalance":1000.0,"accountType":"LIVE","comment":"T1-0872999T","dnb":false,"finTranID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","finTranTypeID":"DIV","feeSec":0.0,"feeTaf":0.0,"feeBase":0.0,"feeXtraShares":0.0,"feeExchange":0.0,"fillQty":0.0,"fillPx":0.0,"sendCommissionToInteliclear":false,"systemAmount":0.0,"tranAmount":1000,"tranSource":"INTE","tranWhen":"2021-07-04 + 23:39:19","wlpAmount":0.0,"wlpFinTranTypeID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrument":{"id":"20076f7d-ff21-4741-86be-33dac978ceff","symbol":"LIT","name":"Global + X Lithium & Battery Tech ETF"},"dividend":{"type":"CASH","amountPerShare":0.0622,"taxCode":"FULLY_TAXABLE"},"dividendTax":null,"mergerAcquisition":null,"positionDelta":null,"orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g"},{"accountAmount":1.0,"accountBalance":1000.0,"accountType":"LIVE","comment":"T1-0872999T","dnb":false,"finTranID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","finTranTypeID":"DIV","feeSec":0.0,"feeTaf":0.0,"feeBase":0.0,"feeXtraShares":0.0,"feeExchange":0.0,"fillQty":0.0,"fillPx":0.0,"sendCommissionToInteliclear":false,"systemAmount":0.0,"tranAmount":1000,"tranSource":"INTE","tranWhen":"2021-07-04 + 23:39:19","wlpAmount":0.0,"wlpFinTranTypeID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrument":{"id":"20076f7d-ff21-4741-86be-33dac978ceff","symbol":"COP","name":"ConocoPhillips"},"dividend":{"type":"CASH","amountPerShare":0.7,"taxCode":"FULLY_TAXABLE"},"dividendTax":null,"mergerAcquisition":null,"positionDelta":null,"orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g"},{"accountAmount":1.0,"accountBalance":1000.0,"accountType":"LIVE","comment":"T1-0872999T","dnb":false,"finTranID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","finTranTypeID":"DIVTAX","feeSec":0.0,"feeTaf":0.0,"feeBase":0.0,"feeXtraShares":0.0,"feeExchange":0.0,"fillQty":0.0,"fillPx":0.0,"sendCommissionToInteliclear":false,"systemAmount":0.0,"tranAmount":1000,"tranSource":"INTE","tranWhen":"2021-07-04 + 23:39:19","wlpAmount":0.0,"wlpFinTranTypeID":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrument":{"id":"20076f7d-ff21-4741-86be-33dac978ceff","symbol":"COP","name":"ConocoPhillips"},"dividend":null,"dividendTax":{"rate":0.15,"type":"NON_RESIDENT_ALIEN"},"mergerAcquisition":null,"positionDelta":null,"orderID":"HHI.1cf93550-8eb4-4c32-a229-826cf8c1be59","orderNo":"Z5-3001375g"}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_transaction/test_list_transactions[exchange1-request_1].yaml b/tests/cassettes/test_transaction/test_list_transactions[exchange1-request_1].yaml index 6c0e299..1b45d7d 100644 --- a/tests/cassettes/test_transaction/test_list_transactions[exchange1-request_1].yaml +++ b/tests/cassettes/test_transaction/test_list_transactions[exchange1-request_1].yaml @@ -10,25 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2021-11-15", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "investorAccreditations": null, "proscoreStatus": null, - "fxSpeed": "Regular", "facilitaStatus": null, "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"investorAccreditations":null,"proscoreStatus":null,"fxSpeed":"Regular","facilitaStatus":null,"dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -45,27 +27,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/orders/tradeActivity?size=3&page=0 response: body: - string: - '{"items": [{"brokerOrderId": 11111, "instrumentCode": "CBA.XAU", "type": - "MARKET_TO_LIMIT", "side": "BUY", "limitPrice": 97.3, "averagePrice": 97.08, - "completedTimestamp": "2022-07-25T05:17:10.595", "placedTimestamp": "2022-07-25T15:17:10.231591", - "orderStatus": "CLOSED", "orderCompletionType": "FILLED", "consideration": - 582.48, "effectivePrice": 97.08, "units": 6, "userBrokerageFees": 0.0, "executionDate": - "2022-07-25", "contractNoteReceived": true, "contractNoteNumber": "1799186", - "contractNoteNumbers": ["1799186"]}, {"brokerOrderId": 11111, "instrumentCode": - "COL.XAU", "type": "MARKET_TO_LIMIT", "side": "BUY", "limitPrice": 18.95, - "averagePrice": 18.86, "completedTimestamp": "2022-07-25T05:04:26.126", "placedTimestamp": - "2022-07-25T15:04:25.685884", "oexerderStatus": "CLOSED", "orderCompletionType": - "FILLED", "consideration": 565.8, "effectivePrice": 18.86, "units": 30, "userBrokerageFees": - 0.0, "executionDate": "2022-07-25", "contractNoteReceived": true, "contractNoteNumber": - "1799124", "contractNoteNumbers": ["1799124"]}, {"brokerOrderId": 11111, "instrumentCode": - "VMM.XAU", "type": "MARKET_TO_LIMIT", "side": "SELL", "limitPrice": 0.295, - "averagePrice": 0.295, "completedTimestamp": "2022-05-20T05:49:08.817", "placedTimestamp": - "2022-05-20T15:46:46.189472", "orderStatus": "CLOSED", "orderCompletionType": - "FILLED", "consideration": 590.0, "effectivePrice": 0.295, "units": 2000, - "userBrokerageFees": 0.0, "executionDate": "2022-05-20", "contractNoteReceived": - true, "contractNoteNumber": "1575807", "contractNoteNumbers": ["1575807"]}], - "hasNext": true, "page": 0, "totalItems": 38}' + string: '{"items":[{"brokerOrderId":11111,"instrumentCode":"CBA.XAU","type":"MARKET_TO_LIMIT","side":"BUY","limitPrice":97.3,"averagePrice":97.08,"completedTimestamp":"2022-07-25T05:17:10.595","placedTimestamp":"2022-07-25T15:17:10.231591","orderStatus":"CLOSED","orderCompletionType":"FILLED","consideration":582.48,"effectivePrice":97.08,"units":6,"userBrokerageFees":0.0,"executionDate":"2022-07-25","contractNoteReceived":true,"contractNoteNumber":"11111","contractNoteNumbers":["1799186"]},{"brokerOrderId":11111,"instrumentCode":"COL.XAU","type":"MARKET_TO_LIMIT","side":"BUY","limitPrice":18.95,"averagePrice":18.86,"completedTimestamp":"2022-07-25T05:04:26.126","placedTimestamp":"2022-07-25T15:04:25.685884","oexerderStatus":"CLOSED","orderCompletionType":"FILLED","consideration":565.8,"effectivePrice":18.86,"units":30,"userBrokerageFees":0.0,"executionDate":"2022-07-25","contractNoteReceived":true,"contractNoteNumber":"11111","contractNoteNumbers":["1799124"]},{"brokerOrderId":11111,"instrumentCode":"VMM.XAU","type":"MARKET_TO_LIMIT","side":"SELL","limitPrice":0.295,"averagePrice":0.295,"completedTimestamp":"2022-05-20T05:49:08.817","placedTimestamp":"2022-05-20T15:46:46.189472","orderStatus":"CLOSED","orderCompletionType":"FILLED","consideration":590.0,"effectivePrice":0.295,"units":2000,"userBrokerageFees":0.0,"executionDate":"2022-05-20","contractNoteReceived":true,"contractNoteNumber":"11111","contractNoteNumbers":["1575807"]}],"hasNext":true,"page":0,"totalItems":38}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_watchlist/test_add_to_watchlist.yaml b/tests/cassettes/test_watchlist/test_add_to_watchlist.yaml index 5d3b024..fb2f365 100644 --- a/tests/cassettes/test_watchlist/test_add_to_watchlist.yaml +++ b/tests/cassettes/test_watchlist/test_add_to_watchlist.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -44,29 +27,19 @@ interactions: response: body: string: - '{"products": [{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "stakeInstrumentId": - "732309e2-71df-41c8-89ac-6bdc2b09356a", "instrumentTypeID": null, "symbol": - "SPOT", "description": "Spotify Technology SA a Luxembourg-based company, - which offers digital music-streaming services. The Company enables users to - discover new releases, which includes the latest singles and albums; playlists, - which includes ready-made playlists put together by music fans and experts, - and over millions of songs so that users can play their favorites, discover - new tracks and build a personalized collection. Users can either select Spotify - Free, which includes only shuffle play or Spotify Premium, which encompasses - a range of features, such as shuffle play, advertisement free, unlimited skips, - listen offline, play any track and high quality audio. The Company operates - through a number of subsidiaries, including Spotify LTD and is present in - over 20 countries.", "category": "Stock", "currencyID": null, "urlImage": - "https://drivewealth.imgix.net/symbols/spot.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "sector": null, "name": "Spotify Technology SA", "prePostMarketDailyReturn": - -0.87, "prePostMarketDailyReturnPercentage": -0.13, "dailyReturn": -5.56, - "dailyReturnPercentage": -0.81, "lastTraded": 682.24, "monthlyReturn": 0.0, - "yearlyReturnPercentage": 92.8, "yearlyReturnValue": 131.68, "popularity": - 9470.0, "watched": 8806, "news": 0, "bought": 14189, "viewed": 26300, "productType": - "Instrument", "exchange": null, "status": "ACTIVE", "type": "EQUITY", "encodedName": - "spotify-technology-sa-spot", "period": "YEAR RETURN", "extendedHoursNotionalStatus": - "ACTIVE", "inceptionDate": 1522713600000, "marketCap": 121400901583, "instrumentTags": - [], "childInstruments": []}]}' + '{"products":[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentTypeID":null,"symbol":"SPOT","description":"Spotify + Technology SA a Luxembourg-based company, which offers digital music-streaming + services. The Company enables users to discover new releases, which includes + the latest singles and albums; playlists, which includes ready-made playlists + put together by music fans and experts, and over millions of songs so that + users can play their favorites, discover new tracks and build a personalized + collection. Users can either select Spotify Free, which includes only shuffle + play or Spotify Premium, which encompasses a range of features, such as shuffle + play, advertisement free, unlimited skips, listen offline, play any track + and high quality audio. The Company operates through a number of subsidiaries, + including Spotify LTD and is present in over 20 countries.","category":"Stock","currencyID":null,"urlImage":"https://drivewealth.imgix.net/symbols/spot.png?fit=fillmax&w=125&h=125&bg=FFFFFF","sector":null,"name":"Spotify + Technology SA","prePostMarketDailyReturn":-0.87,"prePostMarketDailyReturnPercentage":-0.13,"dailyReturn":-5.56,"dailyReturnPercentage":-0.81,"lastTraded":682.24,"monthlyReturn":0.0,"yearlyReturnPercentage":92.8,"yearlyReturnValue":131.68,"popularity":9470.0,"watched":8806,"news":0,"bought":14189,"viewed":26300,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"spotify-technology-sa-spot","period":"YEAR + RETURN","extendedHoursNotionalStatus":"ACTIVE","inceptionDate":1522713600000,"marketCap":121400901583,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -82,9 +55,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/instruments/addRemoveInstrumentWatchlist response: body: - string: - '{"instrumentId": "4ef83d08-bd4e-4f2f-883c-6ec43e85e8f6", "watching": - true}' + string: '{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","watching":true}' headers: {} status: code: 202 diff --git a/tests/cassettes/test_watchlist/test_create_watchlist[exchange0-symbols0].yaml b/tests/cassettes/test_watchlist/test_create_watchlist[exchange0-symbols0].yaml index d7de3e1..d95d2b6 100644 --- a/tests/cassettes/test_watchlist/test_create_watchlist[exchange0-symbols0].yaml +++ b/tests/cassettes/test_watchlist/test_create_watchlist[exchange0-symbols0].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Instant","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -40,62 +23,28 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/us/instrument/watchlists + uri: https://api.prd.hellostake.com/us/instrument/watchlists response: body: - string: - '{"generated": false, "watchlists": [{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-13", "timeCreated": "2025-08-12T23:54:17.121422Z", - "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-14", "timeCreated": "2025-08-14T01:58:57.211214Z", "count": - 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-15", - "timeCreated": "2025-08-15T01:35:39.886173Z", "count": 17}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-18", "timeCreated": - "2025-08-18T02:09:51.269589Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-19", "timeCreated": "2025-08-19T05:27:40.000616Z", - "count": 16}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-21", "timeCreated": "2025-08-21T01:32:29.335752Z", "count": - 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-22", - "timeCreated": "2025-08-22T04:34:50.976937Z", "count": 15}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-23", "timeCreated": - "2025-08-22T21:47:06.609169Z", "count": 14}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-26", "timeCreated": "2025-08-26T02:29:35.0685Z", - "count": 15}]}' + string: '{"generated":false,"watchlists":[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","timeCreated":"2020-01-01T00:00:00.000Z","count":25},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","timeCreated":"2020-01-01T00:00:00.000Z","count":24},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-22","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-02","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","timeCreated":"2020-01-01T00:00:00.000Z","count":28}]}' headers: {} status: code: 200 message: OK - request: - body: null + body: + name: test_watchlist__NYSEUrl + tickers: null headers: Accept: - application/json Content-Type: - application/json method: POST - uri: https://api2.prd.hellostake.com/us/instrument/watchlist + uri: https://api.prd.hellostake.com/us/instrument/watchlist response: body: - string: - '{"newWatchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "watchlists": - [{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", - "timeCreated": "2025-08-12T23:54:17.121422Z", "count": 15}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-14", "timeCreated": - "2025-08-14T01:58:57.211214Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-15", "timeCreated": "2025-08-15T01:35:39.886173Z", - "count": 17}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-18", "timeCreated": "2025-08-18T02:09:51.269589Z", "count": - 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-19", - "timeCreated": "2025-08-19T05:27:40.000616Z", "count": 16}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-21", "timeCreated": - "2025-08-21T01:32:29.335752Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-22", "timeCreated": "2025-08-22T04:34:50.976937Z", - "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-23", "timeCreated": "2025-08-22T21:47:06.609169Z", "count": - 14}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-26", - "timeCreated": "2025-08-26T02:29:35.0685Z", "count": 15}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "timeCreated": "2025-09-01T13:05:45.299653Z", "count": 0}]}' + string: '{"newWatchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","watchlists":[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","timeCreated":"2020-01-01T00:00:00.000Z","count":25},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","timeCreated":"2020-01-01T00:00:00.000Z","count":24},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-22","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-02","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","timeCreated":"2020-01-01T00:00:00.000Z","count":0}]}' headers: {} status: code: 200 @@ -108,12 +57,10 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "count": 0, "instruments": []}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","count":0,"instruments":[]}' headers: {} status: code: 200 @@ -126,36 +73,30 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "count": 0, "instruments": []}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","count":0,"instruments":[]}' headers: {} status: code: 200 message: OK - request: - body: null + body: + tickers: + - TSLA + - GOOG + - MSFT headers: Accept: - application/json Content-Type: - application/json method: POST - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59/items + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59/items response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "count": 3, "instruments": [{"instrumentId": "68277cc0-6106-4f3c-849b-1298ba964aba", - "stakeInstrumentId": "9606cf50-41fe-42ea-b489-6da1768bc26e", "name": "Alphabet - Inc. - Class C Shares", "symbol": "GOOG"}, {"instrumentId": "5b85fabb-d57c-44e6-a7f6-a3efc760226c", - "stakeInstrumentId": "b4889388-1f73-46e5-a865-a68e5fd61ca5", "name": "Tesla, - Inc.", "symbol": "TSLA"}, {"instrumentId": "e234cc98-cd08-4b04-a388-fe5c822beea6", - "stakeInstrumentId": "e3769c0b-456d-49dd-bec5-7a750c146d11", "name": "Microsoft - Corporation", "symbol": "MSFT"}]}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","count":3,"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Alphabet","symbol":"GOOG"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Tesla","symbol":"TSLA"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Microsoft","symbol":"MSFT"}]}' headers: {} status: code: 200 @@ -168,18 +109,10 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "count": 3, "instruments": [{"instrumentId": "68277cc0-6106-4f3c-849b-1298ba964aba", - "stakeInstrumentId": "9606cf50-41fe-42ea-b489-6da1768bc26e", "name": "Alphabet - Inc. - Class C Shares", "symbol": "GOOG"}, {"instrumentId": "5b85fabb-d57c-44e6-a7f6-a3efc760226c", - "stakeInstrumentId": "b4889388-1f73-46e5-a865-a68e5fd61ca5", "name": "Tesla, - Inc.", "symbol": "TSLA"}, {"instrumentId": "e234cc98-cd08-4b04-a388-fe5c822beea6", - "stakeInstrumentId": "e3769c0b-456d-49dd-bec5-7a750c146d11", "name": "Microsoft - Corporation", "symbol": "MSFT"}]}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","count":3,"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Alphabet","symbol":"GOOG"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Tesla","symbol":"TSLA"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Microsoft","symbol":"MSFT"}]}' headers: {} status: code: 200 @@ -192,18 +125,10 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "count": 3, "instruments": [{"instrumentId": "68277cc0-6106-4f3c-849b-1298ba964aba", - "stakeInstrumentId": "9606cf50-41fe-42ea-b489-6da1768bc26e", "name": "Alphabet - Inc. - Class C Shares", "symbol": "GOOG"}, {"instrumentId": "5b85fabb-d57c-44e6-a7f6-a3efc760226c", - "stakeInstrumentId": "b4889388-1f73-46e5-a865-a68e5fd61ca5", "name": "Tesla, - Inc.", "symbol": "TSLA"}, {"instrumentId": "e234cc98-cd08-4b04-a388-fe5c822beea6", - "stakeInstrumentId": "e3769c0b-456d-49dd-bec5-7a750c146d11", "name": "Microsoft - Corporation", "symbol": "MSFT"}]}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","count":3,"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Alphabet","symbol":"GOOG"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Tesla","symbol":"TSLA"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Microsoft","symbol":"MSFT"}]}' headers: {} status: code: 200 @@ -220,12 +145,10 @@ interactions: Content-Type: - application/json method: DELETE - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59/items + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59/items response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "count": 0, "instruments": []}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","count":0,"instruments":[]}' headers: {} status: code: 200 @@ -238,26 +161,10 @@ interactions: Content-Type: - application/json method: DELETE - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '[{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", - "timeCreated": "2025-08-12T23:54:17.121422Z", "count": 15}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-14", "timeCreated": - "2025-08-14T01:58:57.211214Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-15", "timeCreated": "2025-08-15T01:35:39.886173Z", - "count": 17}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-18", "timeCreated": "2025-08-18T02:09:51.269589Z", "count": - 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-19", - "timeCreated": "2025-08-19T05:27:40.000616Z", "count": 16}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-21", "timeCreated": - "2025-08-21T01:32:29.335752Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-22", "timeCreated": "2025-08-22T04:34:50.976937Z", - "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-23", "timeCreated": "2025-08-22T21:47:06.609169Z", "count": - 14}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-26", - "timeCreated": "2025-08-26T02:29:35.0685Z", "count": 15}]' + string: '[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","timeCreated":"2020-01-01T00:00:00.000Z","count":25},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","timeCreated":"2020-01-01T00:00:00.000Z","count":24},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-22","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-02","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","timeCreated":"2020-01-01T00:00:00.000Z","count":28}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_watchlist/test_create_watchlist[exchange1-symbols1].yaml b/tests/cassettes/test_watchlist/test_create_watchlist[exchange1-symbols1].yaml index b69948b..b685090 100644 --- a/tests/cassettes/test_watchlist/test_create_watchlist[exchange1-symbols1].yaml +++ b/tests/cassettes/test_watchlist/test_create_watchlist[exchange1-symbols1].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Instant","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -43,29 +26,15 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlists response: body: - string: - '{"generated": false, "watchlists": [{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-05", "count": 13, "timeCreated": "2025-08-05T07:20:15.861472"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-06", - "count": 14, "timeCreated": "2025-08-06T11:14:12.301944"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-09", "count": - 15, "timeCreated": "2025-08-09T00:40:14.987686"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-11", "count": 15, "timeCreated": "2025-08-11T10:47:31.306034"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", - "count": 14, "timeCreated": "2025-08-13T06:34:29.643625"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-21", "count": - 16, "timeCreated": "2025-08-21T01:40:59.486169"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-22", "count": 16, "timeCreated": "2025-08-22T05:00:05.327484"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-23", - "count": 14, "timeCreated": "2025-08-22T21:55:05.81269"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-26", "count": - 16, "timeCreated": "2025-08-26T02:52:58.934391"}]}' + string: '{"generated":false,"watchlists":[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-12","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","count":13,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","count":12,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","count":10,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","count":15,"timeCreated":"2020-01-01T00:00:00.000Z"}]}' headers: {} status: code: 200 message: OK - request: - body: null + body: + name: test_watchlist__ASXUrl + tickers: null headers: Accept: - application/json @@ -75,25 +44,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlist response: body: - string: - '{"newWatchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "watchlists": - [{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-05", - "count": 13, "timeCreated": "2025-08-05T07:20:15.861472"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-06", "count": - 14, "timeCreated": "2025-08-06T11:14:12.301944"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-09", "count": 15, "timeCreated": "2025-08-09T00:40:14.987686"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-11", - "count": 15, "timeCreated": "2025-08-11T10:47:31.306034"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", "count": - 14, "timeCreated": "2025-08-13T06:34:29.643625"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-21", "count": 16, "timeCreated": "2025-08-21T01:40:59.486169"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-22", - "count": 16, "timeCreated": "2025-08-22T05:00:05.327484"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-23", "count": - 14, "timeCreated": "2025-08-22T21:55:05.81269"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-26", "count": 16, "timeCreated": "2025-08-26T02:52:58.934391"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 0, "timeCreated": "2025-09-01T13:05:47.428516"}]}' + string: '{"newWatchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","watchlists":[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-12","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","count":13,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","count":12,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","count":10,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","count":15,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":0,"timeCreated":"2020-01-01T00:00:00.000Z"}]}' headers: {} status: code: 201 @@ -109,9 +60,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 0, "instruments": []}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":0,"instruments":[]}' headers: {} status: code: 200 @@ -127,15 +76,17 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 0, "instruments": []}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":0,"instruments":[]}' headers: {} status: code: 200 message: OK - request: - body: null + body: + tickers: + - COL + - WDS + - BHP headers: Accept: - application/json @@ -146,13 +97,10 @@ interactions: response: body: string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 3, "instruments": [{"instrumentId": "BHP.XAU", "name": "BHP Group - Limited", "symbol": "BHP", "recentAnnouncement": false, "sensitive": false}, - {"instrumentId": "WDS.XAU", "name": "Woodside Energy Group Ltd", "symbol": - "WDS", "recentAnnouncement": false, "sensitive": false}, {"instrumentId": - "COL.XAU", "name": "Coles Group Limited", "symbol": "COL", "recentAnnouncement": - true, "sensitive": false}]}' + '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":3,"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"BHP + Group","symbol":"BHP","recentAnnouncement":true,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Woodside + Energy Group","symbol":"WDS","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Coles + Group","symbol":"COL","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}]}' headers: {} status: code: 201 @@ -169,13 +117,10 @@ interactions: response: body: string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 3, "instruments": [{"instrumentId": "BHP.XAU", "name": "BHP Group - Limited", "symbol": "BHP", "recentAnnouncement": false, "sensitive": false}, - {"instrumentId": "WDS.XAU", "name": "Woodside Energy Group Ltd", "symbol": - "WDS", "recentAnnouncement": false, "sensitive": false}, {"instrumentId": - "COL.XAU", "name": "Coles Group Limited", "symbol": "COL", "recentAnnouncement": - true, "sensitive": false}]}' + '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":3,"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"BHP + Group","symbol":"BHP","recentAnnouncement":true,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Woodside + Energy Group","symbol":"WDS","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Coles + Group","symbol":"COL","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}]}' headers: {} status: code: 200 @@ -192,13 +137,10 @@ interactions: response: body: string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 3, "instruments": [{"instrumentId": "BHP.XAU", "name": "BHP Group - Limited", "symbol": "BHP", "recentAnnouncement": false, "sensitive": false}, - {"instrumentId": "WDS.XAU", "name": "Woodside Energy Group Ltd", "symbol": - "WDS", "recentAnnouncement": false, "sensitive": false}, {"instrumentId": - "COL.XAU", "name": "Coles Group Limited", "symbol": "COL", "recentAnnouncement": - true, "sensitive": false}]}' + '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":3,"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"BHP + Group","symbol":"BHP","recentAnnouncement":true,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Woodside + Energy Group","symbol":"WDS","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Coles + Group","symbol":"COL","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}]}' headers: {} status: code: 200 @@ -218,9 +160,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59/items response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 0, "instruments": []}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":0,"instruments":[]}' headers: {} status: code: 200 @@ -236,22 +176,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '[{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-05", - "count": 13, "timeCreated": "2025-08-05T07:20:15.861472"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-06", "count": - 14, "timeCreated": "2025-08-06T11:14:12.301944"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-09", "count": 15, "timeCreated": "2025-08-09T00:40:14.987686"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-11", - "count": 15, "timeCreated": "2025-08-11T10:47:31.306034"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", "count": - 14, "timeCreated": "2025-08-13T06:34:29.643625"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-21", "count": 16, "timeCreated": "2025-08-21T01:40:59.486169"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-22", - "count": 16, "timeCreated": "2025-08-22T05:00:05.327484"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-23", "count": - 14, "timeCreated": "2025-08-22T21:55:05.81269"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-26", "count": 16, "timeCreated": "2025-08-26T02:52:58.934391"}]' + string: '[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-12","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","count":13,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","count":12,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","count":10,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","count":15,"timeCreated":"2020-01-01T00:00:00.000Z"}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_watchlist/test_create_watchlist_with_tickers[exchange0-symbols0].yaml b/tests/cassettes/test_watchlist/test_create_watchlist_with_tickers[exchange0-symbols0].yaml index 5ad0d93..008290e 100644 --- a/tests/cassettes/test_watchlist/test_create_watchlist_with_tickers[exchange0-symbols0].yaml +++ b/tests/cassettes/test_watchlist/test_create_watchlist_with_tickers[exchange0-symbols0].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Instant","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -40,62 +23,32 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/us/instrument/watchlists + uri: https://api.prd.hellostake.com/us/instrument/watchlists response: body: - string: - '{"generated": false, "watchlists": [{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-13", "timeCreated": "2025-08-12T23:54:17.121422Z", - "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-14", "timeCreated": "2025-08-14T01:58:57.211214Z", "count": - 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-15", - "timeCreated": "2025-08-15T01:35:39.886173Z", "count": 17}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-18", "timeCreated": - "2025-08-18T02:09:51.269589Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-19", "timeCreated": "2025-08-19T05:27:40.000616Z", - "count": 16}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-21", "timeCreated": "2025-08-21T01:32:29.335752Z", "count": - 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-22", - "timeCreated": "2025-08-22T04:34:50.976937Z", "count": 15}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-23", "timeCreated": - "2025-08-22T21:47:06.609169Z", "count": 14}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-26", "timeCreated": "2025-08-26T02:29:35.0685Z", - "count": 15}]}' + string: '{"generated":false,"watchlists":[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","timeCreated":"2020-01-01T00:00:00.000Z","count":25},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","timeCreated":"2020-01-01T00:00:00.000Z","count":24},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-22","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-02","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","timeCreated":"2020-01-01T00:00:00.000Z","count":28}]}' headers: {} status: code: 200 message: OK - request: - body: null + body: + name: test_watchlist__NYSEUrl + tickers: + - TSLA + - GOOG + - MSFT + - NOK headers: Accept: - application/json Content-Type: - application/json method: POST - uri: https://api2.prd.hellostake.com/us/instrument/watchlist + uri: https://api.prd.hellostake.com/us/instrument/watchlist response: body: - string: - '{"newWatchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "watchlists": - [{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", - "timeCreated": "2025-08-12T23:54:17.121422Z", "count": 15}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-14", "timeCreated": - "2025-08-14T01:58:57.211214Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-15", "timeCreated": "2025-08-15T01:35:39.886173Z", - "count": 17}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-18", "timeCreated": "2025-08-18T02:09:51.269589Z", "count": - 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-19", - "timeCreated": "2025-08-19T05:27:40.000616Z", "count": 16}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-21", "timeCreated": - "2025-08-21T01:32:29.335752Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-22", "timeCreated": "2025-08-22T04:34:50.976937Z", - "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-23", "timeCreated": "2025-08-22T21:47:06.609169Z", "count": - 14}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-26", - "timeCreated": "2025-08-26T02:29:35.0685Z", "count": 15}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "timeCreated": "2025-09-01T13:05:48.891648Z", "count": 0}]}' + string: '{"newWatchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","watchlists":[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","timeCreated":"2020-01-01T00:00:00.000Z","count":25},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","timeCreated":"2020-01-01T00:00:00.000Z","count":24},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-22","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-02","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","timeCreated":"2020-01-01T00:00:00.000Z","count":0}]}' headers: {} status: code: 200 @@ -108,38 +61,33 @@ interactions: Content-Type: - application/json method: GET - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "count": 0, "instruments": []}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","count":0,"instruments":[]}' headers: {} status: code: 200 message: OK - request: - body: null + body: + tickers: + - TSLA + - GOOG + - MSFT + - NOK headers: Accept: - application/json Content-Type: - application/json method: POST - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59/items + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59/items response: body: string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__NYSEUrl", - "count": 4, "instruments": [{"instrumentId": "68277cc0-6106-4f3c-849b-1298ba964aba", - "stakeInstrumentId": "9606cf50-41fe-42ea-b489-6da1768bc26e", "name": "Alphabet - Inc. - Class C Shares", "symbol": "GOOG"}, {"instrumentId": "5772f238-235d-40c2-9053-c13815fee7eb", - "stakeInstrumentId": "b19da77b-0d19-420d-9a63-26b697182773", "name": "Nokia - Corp.", "symbol": "NOK"}, {"instrumentId": "5b85fabb-d57c-44e6-a7f6-a3efc760226c", - "stakeInstrumentId": "b4889388-1f73-46e5-a865-a68e5fd61ca5", "name": "Tesla, - Inc.", "symbol": "TSLA"}, {"instrumentId": "e234cc98-cd08-4b04-a388-fe5c822beea6", - "stakeInstrumentId": "e3769c0b-456d-49dd-bec5-7a750c146d11", "name": "Microsoft - Corporation", "symbol": "MSFT"}]}' + '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__NYSEUrl","count":4,"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Alphabet","symbol":"GOOG"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Nokia + Oyj","symbol":"NOK"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Tesla","symbol":"TSLA"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Microsoft","symbol":"MSFT"}]}' headers: {} status: code: 200 @@ -152,26 +100,10 @@ interactions: Content-Type: - application/json method: DELETE - uri: https://api2.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 + uri: https://api.prd.hellostake.com/us/instrument/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '[{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", - "timeCreated": "2025-08-12T23:54:17.121422Z", "count": 15}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-14", "timeCreated": - "2025-08-14T01:58:57.211214Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-15", "timeCreated": "2025-08-15T01:35:39.886173Z", - "count": 17}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-18", "timeCreated": "2025-08-18T02:09:51.269589Z", "count": - 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-19", - "timeCreated": "2025-08-19T05:27:40.000616Z", "count": 16}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-21", "timeCreated": - "2025-08-21T01:32:29.335752Z", "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-22", "timeCreated": "2025-08-22T04:34:50.976937Z", - "count": 15}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": - "test-2025-08-23", "timeCreated": "2025-08-22T21:47:06.609169Z", "count": - 14}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-26", - "timeCreated": "2025-08-26T02:29:35.0685Z", "count": 15}]' + string: '[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","timeCreated":"2020-01-01T00:00:00.000Z","count":25},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","timeCreated":"2020-01-01T00:00:00.000Z","count":24},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-22","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-02","timeCreated":"2020-01-01T00:00:00.000Z","count":27},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","timeCreated":"2020-01-01T00:00:00.000Z","count":28},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","timeCreated":"2020-01-01T00:00:00.000Z","count":28}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_watchlist/test_create_watchlist_with_tickers[exchange1-symbols1].yaml b/tests/cassettes/test_watchlist/test_create_watchlist_with_tickers[exchange1-symbols1].yaml index 0a95b3b..c386782 100644 --- a/tests/cassettes/test_watchlist/test_create_watchlist_with_tickers[exchange1-symbols1].yaml +++ b/tests/cassettes/test_watchlist/test_create_watchlist_with_tickers[exchange1-symbols1].yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Instant","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -43,29 +26,19 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlists response: body: - string: - '{"generated": false, "watchlists": [{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-05", "count": 13, "timeCreated": "2025-08-05T07:20:15.861472"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-06", - "count": 14, "timeCreated": "2025-08-06T11:14:12.301944"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-09", "count": - 15, "timeCreated": "2025-08-09T00:40:14.987686"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-11", "count": 15, "timeCreated": "2025-08-11T10:47:31.306034"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", - "count": 14, "timeCreated": "2025-08-13T06:34:29.643625"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-21", "count": - 16, "timeCreated": "2025-08-21T01:40:59.486169"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-22", "count": 16, "timeCreated": "2025-08-22T05:00:05.327484"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-23", - "count": 14, "timeCreated": "2025-08-22T21:55:05.81269"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-26", "count": - 16, "timeCreated": "2025-08-26T02:52:58.934391"}]}' + string: '{"generated":false,"watchlists":[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-12","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","count":13,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","count":12,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","count":10,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","count":15,"timeCreated":"2020-01-01T00:00:00.000Z"}]}' headers: {} status: code: 200 message: OK - request: - body: null + body: + name: test_watchlist__ASXUrl + tickers: + - COL + - WDS + - BHP + - OOO headers: Accept: - application/json @@ -75,25 +48,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlist response: body: - string: - '{"newWatchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "watchlists": - [{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-05", - "count": 13, "timeCreated": "2025-08-05T07:20:15.861472"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-06", "count": - 14, "timeCreated": "2025-08-06T11:14:12.301944"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-09", "count": 15, "timeCreated": "2025-08-09T00:40:14.987686"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-11", - "count": 15, "timeCreated": "2025-08-11T10:47:31.306034"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", "count": - 14, "timeCreated": "2025-08-13T06:34:29.643625"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-21", "count": 16, "timeCreated": "2025-08-21T01:40:59.486169"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-22", - "count": 16, "timeCreated": "2025-08-22T05:00:05.327484"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-23", "count": - 14, "timeCreated": "2025-08-22T21:55:05.81269"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-26", "count": 16, "timeCreated": "2025-08-26T02:52:58.934391"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 0, "timeCreated": "2025-09-01T13:05:50.279057"}]}' + string: '{"newWatchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","watchlists":[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-12","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","count":13,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","count":12,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","count":10,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","count":15,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":0,"timeCreated":"2020-01-01T00:00:00.000Z"}]}' headers: {} status: code: 201 @@ -109,15 +64,18 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 0, "instruments": []}' + string: '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":0,"instruments":[]}' headers: {} status: code: 200 message: OK - request: - body: null + body: + tickers: + - COL + - WDS + - BHP + - OOO headers: Accept: - application/json @@ -128,15 +86,11 @@ interactions: response: body: string: - '{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test_watchlist__ASXUrl", - "count": 4, "instruments": [{"instrumentId": "OOO.XAU", "name": "BetaShares - Crude Oil Index ETF-Currency Hedged (Synthetic)", "symbol": "OOO", "recentAnnouncement": - false, "sensitive": false}, {"instrumentId": "BHP.XAU", "name": "BHP Group - Limited", "symbol": "BHP", "recentAnnouncement": false, "sensitive": false}, - {"instrumentId": "WDS.XAU", "name": "Woodside Energy Group Ltd", "symbol": - "WDS", "recentAnnouncement": false, "sensitive": false}, {"instrumentId": - "COL.XAU", "name": "Coles Group Limited", "symbol": "COL", "recentAnnouncement": - true, "sensitive": false}]}' + '{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"test_watchlist__ASXUrl","count":4,"instruments":[{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Betashares + Crude Oil Index Currency Hdg Cmplx ETF","symbol":"OOO","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"BHP + Group","symbol":"BHP","recentAnnouncement":true,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Woodside + Energy Group","symbol":"WDS","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"},{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Coles + Group","symbol":"COL","recentAnnouncement":false,"sensitive":false,"stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59"}]}' headers: {} status: code: 201 @@ -152,22 +106,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/asx/instrument/v2/watchlist/1cf93550-8eb4-4c32-a229-826cf8c1be59 response: body: - string: - '[{"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-05", - "count": 13, "timeCreated": "2025-08-05T07:20:15.861472"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-06", "count": - 14, "timeCreated": "2025-08-06T11:14:12.301944"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-09", "count": 15, "timeCreated": "2025-08-09T00:40:14.987686"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-11", - "count": 15, "timeCreated": "2025-08-11T10:47:31.306034"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-13", "count": - 14, "timeCreated": "2025-08-13T06:34:29.643625"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-21", "count": 16, "timeCreated": "2025-08-21T01:40:59.486169"}, - {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-22", - "count": 16, "timeCreated": "2025-08-22T05:00:05.327484"}, {"watchlistId": - "1cf93550-8eb4-4c32-a229-826cf8c1be59", "name": "test-2025-08-23", "count": - 14, "timeCreated": "2025-08-22T21:55:05.81269"}, {"watchlistId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", - "name": "test-2025-08-26", "count": 16, "timeCreated": "2025-08-26T02:52:58.934391"}]' + string: '[{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-12","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-13","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-17","count":13,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-20","count":12,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-21","count":10,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-05-28","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-04","count":17,"timeCreated":"2020-01-01T00:00:00.000Z"},{"watchlistId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","name":"Minervini-2026-06-05","count":15,"timeCreated":"2020-01-01T00:00:00.000Z"}]' headers: {} status: code: 200 diff --git a/tests/cassettes/test_watchlist/test_list_watchlist.yaml b/tests/cassettes/test_watchlist/test_list_watchlist.yaml index 08a551f..2e916d9 100644 --- a/tests/cassettes/test_watchlist/test_list_watchlist.yaml +++ b/tests/cassettes/test_watchlist/test_list_watchlist.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 diff --git a/tests/cassettes/test_watchlist/test_remove_from_watchlist.yaml b/tests/cassettes/test_watchlist/test_remove_from_watchlist.yaml index fada0b8..9b0fead 100644 --- a/tests/cassettes/test_watchlist/test_remove_from_watchlist.yaml +++ b/tests/cassettes/test_watchlist/test_remove_from_watchlist.yaml @@ -10,24 +10,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/user response: body: - string: - '{"canTradeOnUnsettledFunds": false, "cpfValue": null, "emailVerified": - true, "hasFunded": true, "hasTraded": true, "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "username": "michael29", "emailAddress": "reevesmegan@gilmore-wright.biz", - "dw_AccountId": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "dw_AccountNumber": - "z0-0593879b", "macAccountNumber": "d9-0481457G", "status": null, "macStatus": - "BASIC_USER", "dwStatus": null, "truliooStatus": "APPROVED", "truliooStatusWithWatchlist": - null, "firstName": "Rita", "middleName": null, "lastName": "Jones", "phoneNumber": - "(640)242-4270x965", "signUpPhase": 0, "ackSignedWhen": "2023-10-01", "createdDate": - 1574303699770, "stakeApprovedDate": null, "accountType": "INDIVIDUAL", "masterAccountId": - null, "referralCode": "W2-6612029X", "referredByCode": null, "regionIdentifier": - "AUS", "assetSummary": null, "fundingStatistics": null, "tradingStatistics": - null, "w8File": [], "rewardJourneyTimestamp": null, "rewardJourneyStatus": - null, "userProfile": {"residentialAddress": null, "postalAddress": null}, - "ledgerBalance": 0.0, "fxSpeed": "Regular", "dateOfBirth": null, "upToDateDetails2021": - "NO_REQUIREMENTS", "stakeKycStatus": "KYC_APPROVED", "awxMigrationDocsRequired": - null, "documentsStatus": "NO_ACTION", "accountStatus": "OPEN", "mfaenabled": - false}' + string: '{"canTradeOnUnsettledFunds":false,"cpfValue":null,"emailVerified":true,"hasFunded":true,"hasTraded":true,"userId":"7c9bbfae-0000-47b7-0000-0e66d868c2cf","username":"annaduran","emailAddress":"steven91@williams-holloway.com","dw_AccountId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","dw_AccountNumber":"Z5-3001375g","macAccountNumber":"Z5-3001375g","status":null,"macStatus":"BASIC_USER","dwStatus":null,"truliooStatus":"APPROVED","truliooStatusWithWatchlist":null,"firstName":"Kevin","middleName":null,"lastName":"Horn","phoneNumber":"518-247-0640","signUpPhase":0,"ackSignedWhen":"2020-02-19","createdDate":1574303699770,"stakeApprovedDate":null,"accountType":"INDIVIDUAL","masterAccountId":null,"referralCode":"Z5-3001375g","referredByCode":null,"regionIdentifier":"AUS","assetSummary":null,"fundingStatistics":null,"tradingStatistics":null,"w8File":[],"rewardJourneyTimestamp":null,"rewardJourneyStatus":null,"userProfile":{"residentialAddress":null,"postalAddress":null},"ledgerBalance":0.0,"fxSpeed":"Regular","dateOfBirth":null,"upToDateDetails2021":"NO_REQUIREMENTS","stakeKycStatus":"KYC_APPROVED","awxMigrationDocsRequired":null,"documentsStatus":"NO_ACTION","accountStatus":"OPEN","mfaenabled":false}' headers: {} status: code: 200 @@ -44,29 +27,19 @@ interactions: response: body: string: - '{"products": [{"id": "1cf93550-8eb4-4c32-a229-826cf8c1be59", "stakeInstrumentId": - "732309e2-71df-41c8-89ac-6bdc2b09356a", "instrumentTypeID": null, "symbol": - "SPOT", "description": "Spotify Technology SA a Luxembourg-based company, - which offers digital music-streaming services. The Company enables users to - discover new releases, which includes the latest singles and albums; playlists, - which includes ready-made playlists put together by music fans and experts, - and over millions of songs so that users can play their favorites, discover - new tracks and build a personalized collection. Users can either select Spotify - Free, which includes only shuffle play or Spotify Premium, which encompasses - a range of features, such as shuffle play, advertisement free, unlimited skips, - listen offline, play any track and high quality audio. The Company operates - through a number of subsidiaries, including Spotify LTD and is present in - over 20 countries.", "category": "Stock", "currencyID": null, "urlImage": - "https://drivewealth.imgix.net/symbols/spot.png?fit=fillmax&w=125&h=125&bg=FFFFFF", - "sector": null, "name": "Spotify Technology SA", "prePostMarketDailyReturn": - -0.87, "prePostMarketDailyReturnPercentage": -0.13, "dailyReturn": -5.56, - "dailyReturnPercentage": -0.81, "lastTraded": 682.24, "monthlyReturn": 0.0, - "yearlyReturnPercentage": 92.8, "yearlyReturnValue": 131.68, "popularity": - 9470.0, "watched": 8806, "news": 0, "bought": 14189, "viewed": 26300, "productType": - "Instrument", "exchange": null, "status": "ACTIVE", "type": "EQUITY", "encodedName": - "spotify-technology-sa-spot", "period": "YEAR RETURN", "extendedHoursNotionalStatus": - "ACTIVE", "inceptionDate": 1522713600000, "marketCap": 121400901583, "instrumentTags": - [], "childInstruments": []}]}' + '{"products":[{"id":"1cf93550-8eb4-4c32-a229-826cf8c1be59","stakeInstrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","instrumentTypeID":null,"symbol":"SPOT","description":"Spotify + Technology SA a Luxembourg-based company, which offers digital music-streaming + services. The Company enables users to discover new releases, which includes + the latest singles and albums; playlists, which includes ready-made playlists + put together by music fans and experts, and over millions of songs so that + users can play their favorites, discover new tracks and build a personalized + collection. Users can either select Spotify Free, which includes only shuffle + play or Spotify Premium, which encompasses a range of features, such as shuffle + play, advertisement free, unlimited skips, listen offline, play any track + and high quality audio. The Company operates through a number of subsidiaries, + including Spotify LTD and is present in over 20 countries.","category":"Stock","currencyID":null,"urlImage":"https://drivewealth.imgix.net/symbols/spot.png?fit=fillmax&w=125&h=125&bg=FFFFFF","sector":null,"name":"Spotify + Technology SA","prePostMarketDailyReturn":-0.87,"prePostMarketDailyReturnPercentage":-0.13,"dailyReturn":-5.56,"dailyReturnPercentage":-0.81,"lastTraded":682.24,"monthlyReturn":0.0,"yearlyReturnPercentage":92.8,"yearlyReturnValue":131.68,"popularity":9470.0,"watched":8806,"news":0,"bought":14189,"viewed":26300,"productType":"Instrument","exchange":null,"status":"ACTIVE","type":"EQUITY","encodedName":"spotify-technology-sa-spot","period":"YEAR + RETURN","extendedHoursNotionalStatus":"ACTIVE","inceptionDate":1522713600000,"marketCap":121400901583,"instrumentTags":[],"childInstruments":[]}]}' headers: {} status: code: 200 @@ -82,9 +55,7 @@ interactions: uri: https://api2.prd.hellostake.com/api/instruments/addRemoveInstrumentWatchlist response: body: - string: - '{"instrumentId": "4ef83d08-bd4e-4f2f-883c-6ec43e85e8f6", "watching": - false}' + string: '{"instrumentId":"1cf93550-8eb4-4c32-a229-826cf8c1be59","watching":false}' headers: {} status: code: 202 diff --git a/tests/conftest.py b/tests/conftest.py index de5ea35..758c179 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,14 +1,12 @@ import asyncio -import json import sys -import uuid import pytest import pytest_asyncio from dotenv import load_dotenv -from faker import Faker from stake.client import StakeClient +from tests.vcr_scrubber import redact_sensitive_data, redact_sensitive_request load_dotenv() @@ -34,93 +32,13 @@ def event_loop(): loop.close() -def redact_sensitive_data(response): - - if not response["body"].get("string", None): - response["headers"] = {} - return response - - fake = Faker() - fake.seed_instance(1234) - fake_user_id = "7c9bbfae-0000-47b7-0000-0e66d868c2cf" - fake_order_id = uuid.UUID(str(uuid.uuid3(uuid.NAMESPACE_URL, "test")), version=4) - - fake_transaction_id = f"HHI.{str(fake_order_id)}" - obfuscated_fields = { - "ackSignedWhen": str(fake.date_this_decade()), - "brokerOrderId": 11111, - "buyingPower": 1000.0, - "cashAvailableForExpressWithdrawal": 1000, - "cashAvailableForTrade": 800, - "cashAvailableForWithdrawal": 1000, - "cashAvailableForWithdrawalRaw": 1000, - "cashAvailableForTransfer": 1000, - "cashBalance": 1000.0, - "comment": fake.pystr_format(), - "createdWhen": str(fake.date_time_this_decade()), - "dw_AccountId": str(fake_order_id), - "dw_AccountNumber": fake.pystr_format(), - "dw_id": str(fake_order_id), - "dwAccountId": str(fake_order_id), - "dwCashAvailableForWithdrawal": 1000, - "dwOrderId": fake_transaction_id, - "emailAddress": fake.email(), - "finTranID": str(fake_order_id), - "firstName": fake.first_name(), - "id": str(fake_order_id), - "lastName": fake.last_name(), - "liquidCash": 1000.0, - "macAccountNumber": fake.pystr_format(), - "openQty": 100, - "orderID": fake_transaction_id, - "orderId": fake_transaction_id, - "orderNo": fake.pystr_format(), - "password": fake.password(), - "phoneNumber": fake.phone_number(), - "postedBalance": 4000, - "productWatchlistID": str(fake_order_id), - "reference": fake.pystr_format(), - "referenceNumber": fake.pystr_format(), - "referralCode": fake.pystr_format(), - "settledCash": 10000.00, - "tranAmount": 1000, - "tranWhen": str(fake.date_time_this_decade()), - "unrealizedDayPLPercent": 1.0, - "unrealizedPL": 1.0, - "userId": "7c9bbfae-0000-47b7-0000-0e66d868c2cf", - "userID": fake_user_id, - "username": fake.simple_profile()["username"], - "watchlistId": str(fake_order_id), - } - - def _redact_response_body(body): - if not body: - return body - - if isinstance(body, list): - body = [_redact_response_body(res) for res in body] - elif isinstance(body, dict): - for field, value in body.items(): - if isinstance(value, list): - body[field] = [_redact_response_body(res) for res in value] - elif isinstance(value, dict): - body[field] = _redact_response_body(value) - else: - body[field] = obfuscated_fields.get(field, value) - - return body - - body = json.loads(response["body"]["string"]) - - response["body"]["string"] = bytes(json.dumps(_redact_response_body(body)), "utf-8") - - response["headers"] = {} - return response - - @pytest.fixture(scope="module") def vcr_config(): return { - "filter_headers": ["stake-session-token"], + "filter_headers": [ + "stake-session-token", + ("authorization", "REDACTED"), + ], + "before_record_request": redact_sensitive_request, "before_record_response": redact_sensitive_data, } diff --git a/tests/test_product.py b/tests/test_product.py index 8ce4573..74fa33b 100644 --- a/tests/test_product.py +++ b/tests/test_product.py @@ -8,7 +8,7 @@ from stake import asx, constant from stake.client import HttpClient, StakeClient from stake.constant import NYSE -from stake.product import Product +from stake.product import Product, ProductsClient @pytest.mark.parametrize("exchange", (constant.NYSE, constant.ASX)) @@ -45,6 +45,60 @@ async def _get_symbol(symbol): ] +@pytest.mark.asyncio +async def test_get_us_product_adds_quote_bid_and_ask(): + class Client: + exchange = constant.NYSE + + async def get(self, url): + return { + "products": [ + { + "id": "16bf66e3-94f5-4357-88d0-48e2a44f44bf", + "symbol": "SE", + "description": "Sea Limited", + "urlImage": "https://example.com/se.png", + "name": "Sea Limited", + "dailyReturn": 1.75, + "dailyReturnPercentage": 2.01, + "lastTraded": 89.02, + "monthlyReturn": 0, + "popularity": 1, + "watched": 1, + "news": 0, + "bought": 1, + "viewed": 1, + "productType": "Instrument", + "encodedName": "sea-limited-se", + "period": "YEAR RETURN", + "instrumentTags": [], + "childInstruments": [], + } + ] + } + + async def post(self, url, payload): + assert url == constant.NYSE.quotes + assert payload == {"symbols": ["SE"]} + return [ + { + "symbol": "SE", + "bid": 88.5, + "ask": 90, + "lastTrade": 89.02, + "marketStatus": "POSTMARKET", + } + ] + + client = Client() + product = await ProductsClient(client).get("SE") + assert product + assert product.bid == 88.5 + assert product.ask == 90 + assert product.last_trade == 89.02 + assert product.market_status == "POSTMARKET" + + @pytest.mark.parametrize( "exchange, symbols", ((constant.NYSE, ["TSLA", "MSFT", "GOOG"]), (constant.ASX, ["ANZ", "WDS", "COL"])), diff --git a/tests/vcr_scrubber.py b/tests/vcr_scrubber.py new file mode 100644 index 0000000..802ffb2 --- /dev/null +++ b/tests/vcr_scrubber.py @@ -0,0 +1,363 @@ +import json +import re +import uuid +from functools import lru_cache +from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse + +from faker import Faker + +FAKE_USER_ID = "7c9bbfae-0000-47b7-0000-0e66d868c2cf" +FAKE_TIMESTAMP_MS = 1574303699770 +FAKE_ISO_TIMESTAMP = "2020-01-01T00:00:00.000Z" + +ADDRESS_FIELDS = frozenset( + { + "city", + "country", + "line1", + "line2", + "postalCode", + "postcode", + "state", + "street", + "suburb", + "zip", + } +) + +SENSITIVE_QUERY_PARAMS = frozenset({"reference"}) + +PRESERVE_ID_FIELDS = frozenset( + { + "currencyID", + "finTranTypeID", + "instrumentTypeID", + } +) + +UUID_IN_PATH_PATTERN = re.compile( + r"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}", + re.IGNORECASE, +) + +UUID_PATTERN = re.compile( + r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", + re.IGNORECASE, +) + + +@lru_cache(maxsize=1) +def _scrub_context(): + fake = Faker() + fake.seed_instance(1234) + fake_order_id = uuid.UUID(str(uuid.uuid3(uuid.NAMESPACE_URL, "test")), version=4) + fake_transaction_id = f"HHI.{fake_order_id}" + fake_reference = fake.pystr_format() + fake_account_code = fake.pystr_format() + + obfuscated_fields = { + "accountAmount": 1.0, + "accountBalance": 1000.0, + "accountNumber": fake_account_code, + "ackSignedWhen": str(fake.date_this_decade()), + "brokerInstructionId": str(fake_order_id), + "brokerInstructionVersionId": str(fake_order_id), + "brokerOrderId": 11111, + "brokerOrderVersionId": str(fake_order_id), + "bsb": fake.pystr_format(), + "buyOrderNumber": fake_account_code, + "buyingPower": 1000.0, + "cardHoldAmount": 0.0, + "cashAvailableForExpressWithdrawal": 1000, + "cashAvailableForTrade": 800, + "cashAvailableForWithdrawal": 1000, + "cashAvailableForWithdrawalHold": 0.0, + "cashAvailableForWithdrawalRaw": 1000, + "cashAvailableForTransfer": 1000, + "cashBalance": 1000.0, + "clearingCash": 0.0, + "comment": fake.pystr_format(), + "contractNoteNumber": 11111, + "contractNoteNumbers": [11111], + "cpfValue": None, + "createdDate": FAKE_TIMESTAMP_MS, + "createdWhen": str(fake.date_time_this_decade()), + "cumQty": "0", + "dateOfBirth": None, + "dw_AccountId": str(fake_order_id), + "dw_AccountNumber": fake_account_code, + "dw_id": str(fake_order_id), + "dwAccountId": str(fake_order_id), + "dwCashAvailableForWithdrawal": 1000, + "dwOrderId": fake_transaction_id, + "emailAddress": fake.email(), + "finTranID": str(fake_order_id), + "firstName": fake.first_name(), + "fromAmount": 1000.0, + "fundsInFlight": 0.0, + "insertDate": FAKE_TIMESTAMP_MS, + "instrumentCodeId": str(fake_order_id), + "instrumentId": str(fake_order_id), + "instrumentID": str(fake_order_id), + "itemId": str(fake_order_id), + "lastName": fake.last_name(), + "ledgerBalance": 0.0, + "liquidCash": 1000.0, + "macAccountNumber": fake_account_code, + "masterAccountId": None, + "middleName": None, + "newWatchlistId": str(fake_order_id), + "openQty": 100, + "orderID": fake_transaction_id, + "orderId": fake_transaction_id, + "orderNo": fake_account_code, + "password": fake.password(), + "pendingOrdersAmount": 0.0, + "pendingPoliAmount": 0.0, + "pendingWithdrawals": 0.0, + "phoneNumber": fake.phone_number(), + "postedBalance": 4000, + "productWatchlistID": str(fake_order_id), + "realizedPL": 1.0, + "reference": fake_reference, + "referenceNumber": fake_account_code, + "referralCode": fake_account_code, + "referredByCode": None, + "reservedCash": 0.0, + "rewardJourneyTimestamp": None, + "sellOrderNumber": fake_account_code, + "settledCash": 10000.00, + "stakeApprovedDate": None, + "stakeInstrumentId": str(fake_order_id), + "tagId": str(fake_order_id), + "tagID": str(fake_order_id), + "text": "Redacted", + "timeCreated": FAKE_ISO_TIMESTAMP, + "timestamp": FAKE_ISO_TIMESTAMP, + "toAmount": 800.0, + "tranAmount": 1000, + "tranWhen": str(fake.date_time_this_decade()), + "unrealizedDayPL": 1.0, + "unrealizedDayPLPercent": 1.0, + "unrealizedPL": 1.0, + "unrealizedPLPercent": 1.0, + "userId": FAKE_USER_ID, + "userID": FAKE_USER_ID, + "username": fake.simple_profile()["username"], + "watchlistId": str(fake_order_id), + "wlpFinTranTypeID": str(fake_order_id), + } + + return fake, fake_order_id, obfuscated_fields + + +def _coerce_replacement(original, replacement): + if replacement is None: + return None + if isinstance(original, str): + return str(replacement) + if isinstance(original, bool): + return bool(replacement) + if isinstance(original, int) and not isinstance(original, bool): + if isinstance(replacement, (int, float)): + return int(replacement) + return replacement + if isinstance(original, float): + if isinstance(replacement, (int, float)): + return float(replacement) + return replacement + return replacement + + +def _looks_like_uuid(value: str) -> bool: + return bool(UUID_PATTERN.match(value)) + + +def _redact_address(address: dict) -> dict: + fake, _, obfuscated_fields = _scrub_context() + redacted = {} + for field, value in address.items(): + if field in ADDRESS_FIELDS: + if field in {"postalCode", "postcode", "zip"}: + redacted[field] = fake.postcode() + elif field == "country": + redacted[field] = fake.country_code() + elif field == "state": + redacted[field] = fake.state_abbr() + else: + redacted[field] = fake.street_address() + elif isinstance(value, dict): + redacted[field] = _redact_json(value) + elif field in obfuscated_fields: + redacted[field] = _coerce_replacement(value, obfuscated_fields[field]) + else: + redacted[field] = value + return redacted + + +def _redact_json(body): + if body is None: + return body + + _, fake_order_id, obfuscated_fields = _scrub_context() + + if isinstance(body, list): + return [_redact_json(item) for item in body] + + if isinstance(body, dict): + redacted = {} + for field, value in body.items(): + if field in {"residentialAddress", "postalAddress"} and isinstance( + value, dict + ): + redacted[field] = _redact_address(value) + elif isinstance(value, list): + redacted[field] = [_redact_json(item) for item in value] + elif isinstance(value, dict): + redacted[field] = _redact_json(value) + elif field in obfuscated_fields: + redacted[field] = _coerce_replacement(value, obfuscated_fields[field]) + elif ( + isinstance(value, str) + and field.endswith(("Id", "ID")) + and field not in PRESERVE_ID_FIELDS + and _looks_like_uuid(value) + ): + redacted[field] = str(fake_order_id) + else: + redacted[field] = value + return redacted + + return body + + +def _normalize_body_string(body): + if body is None: + return None + if isinstance(body, bytes): + return body + if isinstance(body, str): + return body.encode("utf-8") + return None + + +def _parse_json_body(body): + if body is None: + return None + + if isinstance(body, dict): + if "string" in body: + raw = _decode_body_string(body["string"]) + if not raw: + return None + return json.loads(raw) + return body + + raw = _decode_body_string(body) + if not raw: + return None + return json.loads(raw) + + +def _encode_json_body(payload, original_body): + serialized = json.dumps(payload, separators=(",", ":")) + + if isinstance(original_body, dict): + if "string" in original_body: + string_value = original_body["string"] + if isinstance(string_value, bytes): + return {"string": serialized.encode("utf-8")} + return {"string": serialized} + return payload + + if isinstance(original_body, bytes): + return serialized.encode("utf-8") + if isinstance(original_body, str): + return serialized + + return serialized.encode("utf-8") + + +def redact_request_body(body): + if body is None: + return None + + try: + payload = _parse_json_body(body) + except (json.JSONDecodeError, TypeError): + return body + + if payload is None: + return body + + return _encode_json_body(_redact_json(payload), body) + + +def _decode_body_string(body): + normalized = _normalize_body_string(body) + if normalized is None: + return None + return normalized.decode("utf-8") + + +def redact_sensitive_data(response): + body_string = response.get("body", {}).get("string") + if body_string: + raw = _decode_body_string(body_string) + try: + payload = json.loads(raw) + except json.JSONDecodeError: + payload = None + else: + response["body"]["string"] = bytes( + json.dumps(_redact_json(payload), separators=(",", ":")), + "utf-8", + ) + + if response.get("url"): + response["url"] = _redact_request_uri(response["url"]) + + response["headers"] = {} + return response + + +def _redact_request_uri(uri: str) -> str: + _, fake_order_id, obfuscated_fields = _scrub_context() + fake_reference = obfuscated_fields["reference"] + + parsed = urlparse(uri) + path = UUID_IN_PATH_PATTERN.sub(str(fake_order_id), parsed.path) + query = parse_qsl(parsed.query, keep_blank_values=True) + + if query: + redacted_query = [ + ( + key, + fake_reference if key in SENSITIVE_QUERY_PARAMS else value, + ) + for key, value in query + ] + query_string = urlencode(redacted_query) + else: + query_string = parsed.query + + return urlunparse(parsed._replace(path=path, query=query_string)) + + +def redact_sensitive_request(request): + if hasattr(request, "uri"): + if request.uri: + request.uri = _redact_request_uri(request.uri) + if request.body is not None: + request.body = redact_request_body(request.body) + return request + + uri = request.get("uri") + if uri: + request["uri"] = _redact_request_uri(uri) + + body = request.get("body") + if body is not None: + request["body"] = redact_request_body(body) + + return request