1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Resource methods for the `markets` API group.
//!
//! # Operations
//!
//! | Method | Op | Path |
//! |--------|-----|------|
//! | GET | `list_markets` | `/markets` |
//! | GET | `get_market` | `/markets/{market_id}` |
//!
//!
//! ## Multi-ID lookups for `get_market`
//!
//! The Nordnet API path parameter for `get_market` accepts a comma-separated
//! list of market IDs. This method covers the single-ID case via the
//! [`MarketId`] newtype, mirroring the [`Client::get_country`] pattern. A
//! future helper may be added for multi-ID lookups when needed.
//!
//!
//! ## 204 No Content
//!
//! `GET /markets/{market_id}` may return HTTP 204 (No Content) when no
//! matching market is found. The base [`Client::get`] method attempts to
//! parse the empty response body as JSON, which fails. `get_market` detects
//! this specific case (a [`Error::Decode`] with an empty body) and maps it
//! to an empty `Vec`, mirroring [`Client::get_country`].
use crateClient;
use crateError;
use MarketId;
use Market;