pub struct EndpointDescriptor {
pub method: HttpMethod,
pub path: String,
pub params: HashMap<String, String>,
pub request_body: Option<Value>,
pub response_root: Option<String>,
pub interval_map: HashMap<String, String>,
pub response: ResponseMapping,
}Expand description
Describes a single API endpoint (order_book, ticker, or trades).
Fields§
§method: HttpMethodHTTP method. Defaults to GET.
path: StringURL path appended to base_url (e.g., /api/v3/depth).
params: HashMap<String, String>Query parameters for GET, or ignored for POST.
Values may contain {pair}, {limit}, {base}, {quote} placeholders.
request_body: Option<Value>JSON body template for POST requests. Values may contain placeholders.
response_root: Option<String>Dot-path to navigate from the JSON root to the data before field mapping.
Special values:
""or omitted: root is the data."result":json["result"]."data.0":json["data"][0]."result.*": first value underjson["result"]regardless of key.
interval_map: HashMap<String, String>Maps canonical interval names (e.g., 1m, 5m, 1h, 1d) to the
venue-specific strings (e.g., 1min, 5min, hour, day).
Only used by the OHLC capability; omit when the venue accepts canonical names.
response: ResponseMappingField mappings for parsing the response.
Trait Implementations§
Source§impl Clone for EndpointDescriptor
impl Clone for EndpointDescriptor
Source§impl Debug for EndpointDescriptor
impl Debug for EndpointDescriptor
Source§impl<'de> Deserialize<'de> for EndpointDescriptor
impl<'de> Deserialize<'de> for EndpointDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EndpointDescriptor
impl RefUnwindSafe for EndpointDescriptor
impl Send for EndpointDescriptor
impl Sync for EndpointDescriptor
impl Unpin for EndpointDescriptor
impl UnsafeUnpin for EndpointDescriptor
impl UnwindSafe for EndpointDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more