Skip to main content

rest_payload

Function rest_payload 

Source
pub fn rest_payload(
    timestamp_ms: i64,
    api_key: &str,
    recv_window_ms: u64,
    body: &str,
) -> String
Expand description

The string a REST request signs.

§Examples

use brokapi_bybit_protocol::sign::rest_payload;

// The example of the documentation: a GET with a query.
assert_eq!(
    rest_payload(1658384314791, "XXXXXXXXXX", 5000, "category=option&symbol=BTC-29JUL22-25000-C"),
    "1658384314791XXXXXXXXXX5000category=option&symbol=BTC-29JUL22-25000-C"
);