Fetch positions
curl --request GET \
--url https://github.com/openpx-trade/openpx/v1/positions/fetch_positionsimport requests
url = "https://github.com/openpx-trade/openpx/v1/positions/fetch_positions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://github.com/openpx-trade/openpx/v1/positions/fetch_positions', 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://github.com/openpx-trade/openpx/v1/positions/fetch_positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://github.com/openpx-trade/openpx/v1/positions/fetch_positions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://github.com/openpx-trade/openpx/v1/positions/fetch_positions")
.asString();require 'uri'
require 'net/http'
url = URI("https://github.com/openpx-trade/openpx/v1/positions/fetch_positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"average_price": 123,
"current_price": 123,
"market_ticker": "<string>",
"outcome": "<string>",
"size": 123
}
]{
"kind": "Authentication",
"message": "<string>"
}Positions
fetch_positions
List the caller’s open positions, optionally scoped to one market_ticker.
GET
/
v1
/
positions
/
fetch_positions
Fetch positions
curl --request GET \
--url https://github.com/openpx-trade/openpx/v1/positions/fetch_positionsimport requests
url = "https://github.com/openpx-trade/openpx/v1/positions/fetch_positions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://github.com/openpx-trade/openpx/v1/positions/fetch_positions', 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://github.com/openpx-trade/openpx/v1/positions/fetch_positions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://github.com/openpx-trade/openpx/v1/positions/fetch_positions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://github.com/openpx-trade/openpx/v1/positions/fetch_positions")
.asString();require 'uri'
require 'net/http'
url = URI("https://github.com/openpx-trade/openpx/v1/positions/fetch_positions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"average_price": 123,
"current_price": 123,
"market_ticker": "<string>",
"outcome": "<string>",
"size": 123
}
]{
"kind": "Authentication",
"message": "<string>"
}List the caller’s open positions, optionally scoped to one
market_ticker.Query Parameters
Response
Success.
Volume-weighted average entry price as YES probability in [0, 1] (e.g. 0.55).
Current mark price as YES probability in [0, 1] (e.g. 0.62).
Unified market ticker the position is held on (e.g. "KXBTCD-25APR1517").
Outcome label as published by the exchange (e.g. "Yes", "No").
Number of contracts held (e.g. 100.0).

