Realized P&L (production)
curl --request GET \
--url https://api.bullionwale.com/api/trading/v1/pnl \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.bullionwale.com/api/trading/v1/pnl"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"by_metal": {},
"closed_orders": 123,
"environment": "<string>",
"from": "<string>",
"realized_pnl": "<string>",
"symbols": [
{
"closed_orders": 123,
"metal": "<string>",
"realized_pnl": "<string>",
"symbol_code": "<string>"
}
],
"to": "<string>"
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}Profit & loss
Realized P&L (production)
Switched off. Production trading is implemented but not available: orders are refused with 403 production_trading_disabled. Once it opens, Bullionwale enables production access per account (see Production access requirements).
Realized P&L from your closed orders, in total, per metal and per symbol, by the IST day each order closed. Omit from / to for all time. Realized only: open positions are not valued.
Realized P&L (production)
curl --request GET \
--url https://api.bullionwale.com/api/trading/v1/pnl \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.bullionwale.com/api/trading/v1/pnl"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"by_metal": {},
"closed_orders": 123,
"environment": "<string>",
"from": "<string>",
"realized_pnl": "<string>",
"symbols": [
{
"closed_orders": 123,
"metal": "<string>",
"realized_pnl": "<string>",
"symbol_code": "<string>"
}
],
"to": "<string>"
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}{
"detail": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Query Parameters
First IST day (YYYY-MM-DD) included.
Last IST day (YYYY-MM-DD) included.
Response
Successful Response
Realized P&L per metal (gold, silver).
Show child attributes
Show child attributes
First IST day included, or null.
Total realized P&L in rupees, 2 decimals.
Per symbol, only symbols with a closed order.
Show child attributes
Show child attributes
Last IST day included, or null.