Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
exchange.GetRawJSON
Get the raw content returned by the most recent rest request from the current exchange object (exchange, exchanges).
exchange.GetRawJSON()Examples
Query the account, then read and parse the raw response from the exchange.
javascript
function main(){
exchange.GetAccount()
var obj = JSON.parse(exchange.GetRawJSON())
Log(obj)
// Output: the raw JSON object returned by the account endpoint; fields vary by exchange
}
python
import json
def main():
exchange.GetAccount()
obj = json.loads(exchange.GetRawJSON())
Log(obj)
# Output: the raw JSON object returned by the account endpoint; fields vary by exchange
rust
fn main() {
let _ = exchange.GetAccount();
// In Rust GetRawJSON returns a String; parse it with JSONParse
if let Some(obj) = JSONParse(&exchange.GetRawJSON()) {
Log!(obj);
// Output: the raw JSON object returned by the account endpoint; fields vary by exchange
}
}Returns
| Type | Description |
string | Response data from the |
See Also
Remarks
The exchange.GetRawJSON() function only supports live trading.