Get unfilled perp orders
curl --request GET \
--url https://demo-api.mobula.io/api/2/wallet/positions/perp/unfilledimport requests
url = "https://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled', 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://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled",
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://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled"
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://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled")
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{
"data": [
{
"id": "<string>",
"entryPriceQuote": 123,
"currentLeverage": 123,
"amountUSD": 123,
"amountRaw": 123,
"side": "BUY",
"liquidationPriceQuote": 123,
"currentPriceQuote": 123,
"realizedPnlUSD": 123,
"unrealizedPnlUSD": 123,
"realizedPnlPercent": 123,
"unrealizedPnlPercent": 123,
"tp": [
{
"size": 123,
"price": 123,
"id": 123
}
],
"sl": [
{
"size": 123,
"price": 123,
"id": 123
}
],
"marketId": "<string>",
"exchange": "gains",
"feesOpeningUSD": 123,
"feesClosingUSD": 123,
"feesFundingUSD": 123,
"openDate": "<string>",
"lastUpdate": "<string>",
"address": "<string>",
"chainId": "<string>",
"collateralAsset": "<string>",
"type": "STOP"
}
]
}Perps Data
Get Perp Unfilled Orders
Retrieve all open (unfilled) limit or stop orders for a specific wallet.
GET
/
2
/
wallet
/
positions
/
perp
/
unfilled
Get unfilled perp orders
curl --request GET \
--url https://demo-api.mobula.io/api/2/wallet/positions/perp/unfilledimport requests
url = "https://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled', 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://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled",
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://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled"
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://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api.mobula.io/api/2/wallet/positions/perp/unfilled")
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{
"data": [
{
"id": "<string>",
"entryPriceQuote": 123,
"currentLeverage": 123,
"amountUSD": 123,
"amountRaw": 123,
"side": "BUY",
"liquidationPriceQuote": 123,
"currentPriceQuote": 123,
"realizedPnlUSD": 123,
"unrealizedPnlUSD": 123,
"realizedPnlPercent": 123,
"unrealizedPnlPercent": 123,
"tp": [
{
"size": 123,
"price": 123,
"id": 123
}
],
"sl": [
{
"size": 123,
"price": 123,
"id": 123
}
],
"marketId": "<string>",
"exchange": "gains",
"feesOpeningUSD": 123,
"feesClosingUSD": 123,
"feesFundingUSD": 123,
"openDate": "<string>",
"lastUpdate": "<string>",
"address": "<string>",
"chainId": "<string>",
"collateralAsset": "<string>",
"type": "STOP"
}
]
}Query Parameters
Filter orders by chain ID (e.g.
evm:42161). If omitted, returns orders from all supported chains.Filter orders by DEX. Supported values:
gains, lighter. If omitted, returns orders from all supported DEXes.Response
Array of unfilled perpetual orders.
Show PerpsOrder Object
Show PerpsOrder Object
Order size in raw token units (bigint as string). Decimals are the token’s on-chain decimals, except for Lighter which always uses 18 decimals.