pub trait Endpoint {
// Required methods
fn as_endpoint(&self) -> String;
fn http_verb(&self) -> HttpVerb;
fn ip_weight(&self) -> Option<u16>;
fn order_weight(&self) -> Option<u16>;
fn security_type(&self) -> SecurityType;
}
Expand description
Fully describes the HTTP endpoint:
- path;
- HTTP method (verb);
- weight (how much API limits will be affected by the query);
- additional security to access the endpoint.
Required Methods§
Sourcefn as_endpoint(&self) -> String
fn as_endpoint(&self) -> String
The HTTP path for the given request.
Sourcefn http_verb(&self) -> HttpVerb
fn http_verb(&self) -> HttpVerb
HTTP method (verb) used to access the endpoint. The most common are:
- GET
- POST
- PUT
- DELETE
Sourcefn ip_weight(&self) -> Option<u16>
fn ip_weight(&self) -> Option<u16>
The API weight regarding IP limits for the given request.
Endpoints share the 1200 per minute limit based on IP.
Responses contain the header X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter)
,
defining the weight used by the current IP.
Sourcefn order_weight(&self) -> Option<u16>
fn order_weight(&self) -> Option<u16>
The API weight regarding UID (account) limits for the given request.
The order rate limit is counted against each account.
Successful order responses contain the header X-MBX-ORDER-COUNT-(intervalNum)(intervalLetter)
,
defining the order limit used by the UID.
To monitor order count usage, refer to GET api/v3/rateLimit/order
.
Sourcefn security_type(&self) -> SecurityType
fn security_type(&self) -> SecurityType
Determines access to the endpoint.