Read the authorized latest GEX snapshot
curl --request GET \
--url https://api.tradingoctant.com/v1/gex \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tradingoctant.com/v1/gex"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tradingoctant.com/v1/gex', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tradingoctant.com/v1/gex",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tradingoctant.com/v1/gex"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tradingoctant.com/v1/gex")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradingoctant.com/v1/gex")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"tradeDate": "2023-12-25",
"asOf": "2023-11-07T05:31:56Z",
"asOfEt": "<string>",
"spot": 123,
"candles": [
{
"minute": 123,
"o": 123,
"h": 123,
"l": 123,
"c": 123,
"v": 123,
"vw": 123
}
],
"strikes": [
123
],
"groups": [
{
"key": "day",
"levels": {
"netGex": 123,
"flip": 123,
"callWall": 123,
"putWall": 123,
"maxGammaStrike": 123
},
"last": [
123
]
}
],
"basis": "naive"
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}客户 REST API
读取最新 GEX
Read the authorized latest GEX snapshot
curl --request GET \
--url https://api.tradingoctant.com/v1/gex \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tradingoctant.com/v1/gex"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tradingoctant.com/v1/gex', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tradingoctant.com/v1/gex",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tradingoctant.com/v1/gex"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tradingoctant.com/v1/gex")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradingoctant.com/v1/gex")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"symbol": "<string>",
"tradeDate": "2023-12-25",
"asOf": "2023-11-07T05:31:56Z",
"asOfEt": "<string>",
"spot": 123,
"candles": [
{
"minute": 123,
"o": 123,
"h": 123,
"l": 123,
"c": 123,
"v": 123,
"vw": 123
}
],
"strikes": [
123
],
"groups": [
{
"key": "day",
"levels": {
"netGex": 123,
"flip": 123,
"callWall": 123,
"putWall": 123,
"maxGammaStrike": 123
},
"last": [
123
]
}
],
"basis": "naive"
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}返回指定标的的快照。用
tradeDate 和 asOf 对齐交易日与观测时间;用 groups[].key 选择到期组,levels.maxGammaStrike 是该组的 Max Gamma 行权价。缺失的关键位可为 null。
错误处理 401 检查或更换 Key;403 核对授权;422 检查参数;429 遵循 Retry-After 并检查用量;503 稍后重试。授权
响应
Successful response