Your own portfolios: what you hold, its value and its gains. These are the only routes that change data. A key reaches the portfolios of its account and those shared with your organization. Any other returns 404. Changing one you can only view returns 403, and only who created a portfolio can delete it. An organization key reaches only shared ones.
The same portfolios are in your dashboard and in the portfolio MCP tools.
How a lot is recorded
A lot is one purchase or sale: what, how much, at what price and when. A position adds up the lots of one instrument.
quantityhas a sign. It is positive when you hold, negative for a short sale or a written option. It counts shares, contracts or coins.costPerUnitis always positive. For an option it is the price per share: two contracts at $12.40 arequantity: 2andcostPerUnit: 12.40.- An option is named by its symbol in
optionContract, with its underlying inticker. An unknown or expired symbol is rejected. Find symbols in Options. - A coin is sent as
crypto, such asBTC, instead ofticker. It is priced in US dollars, with up to 12 decimals. - A stock outside the US is
MIC:TICKER, such asXPAR:AIR. It is priced at the close only. Answers givetickerandexchange. - Splits are never applied to the quantities and prices you record.
- Record a sale with Close a lot, not by changing the quantity, which loses the gain.
- A lot synced from a broker has
syncedFromand cannot be changed while open. See Sync from a broker. - Each lot keeps the currency of its listing, and each portfolio has one
currencyfor its totals. Theconvertedfields give the values in that currency: what you paid at the rate of that day, or the one of your broker sent asfxRate, and the value at the newest official rate. - Limits: 200 lots in a portfolio, 200 watched instruments and 10 portfolios in an account.
How a portfolio is priced
markSource |
Price |
|---|---|
SettledClose |
Official close of the day in markAsOf. |
LiveQuote |
Live price, when its day is newer than that of the close. |
StockDelayedQuote |
The same, at least 15 minutes old. |
OptionDailyClose |
Last daily price of the option. markAsOf is null when its day is not known. |
OptionDelayedTrade |
The same, 15 minutes delayed. |
CryptoLivePrice |
Last trade of the coin, at markTimeUtc. |
CryptoLastTrade |
Last trade of a coin that has not traded for some minutes. |
CryptoDelayedPrice |
Trade of the coin 15 minutes ago. |
CryptoDailyClose |
Close of the coin on the UTC day in markAsOf. |
null |
No price. See markUnavailableReason. |
| Free | Plus | Pro | |
|---|---|---|---|
| Stocks | Close, 4 hours after the market closes | 15 minutes delayed | Real time |
| Options | Close, 4 hours after the market closes | 15 minutes delayed | Real time |
| Crypto | Close of each UTC day | 15 minutes delayed | Real time |
- No price is
null, never zero. The totals then cover the other positions, andunvaluedPositionCountsays how many are left out. - Nothing is converted at a guessed rate. Without an official one, the
convertedfields arenull, andunconvertedPositionCountsays how many positions are left out. - A watched instrument only has a price. Once you hold it, it is in
positionsand not inwatching.
Your portfolios
GET /v1/portfolios
Your portfolios, without prices.
Request
curl "https://api.equibles.com/v1/portfolios" \
-H "Authorization: Bearer eq_your_api_key"import requests
r = requests.get(
"https://api.equibles.com/v1/portfolios",
headers={"Authorization": "Bearer eq_your_api_key"},
)
print(r.json())const res = await fetch("https://api.equibles.com/v1/portfolios", {
headers: { Authorization: "Bearer eq_your_api_key" },
});
console.log(await res.json());Response
{
"data": [
{
"id": "4da84c34-22d2-4d3e-911b-8e9757650572",
"name": "Docs example REST",
"currency": "USD",
"openLotCount": 2,
"closedLotCount": 1,
"createdAtUtc": "2026-10-14T01:13:12.906733Z",
"access": "Owner"
}
]
}
Response fields
| Field | Meaning |
|---|---|
data array |
One entry per portfolio. |
id string |
Id of the portfolio. |
name string |
Its name. |
currency string |
Currency of its totals. |
openLotCount integer |
Lots still held. |
closedLotCount integer |
Lots sold. |
createdAtUtc date and time |
When it was created, in UTC. |
access string |
What you can do with it: Owner, Edit (change lots and watches) or View. |
sharedBy string |
Who shared it with you. Not sent for your own. |
Shared portfolios
GET /v1/portfolios/shared
Portfolios shared with your organization, without prices.
Request
curl "https://api.equibles.com/v1/portfolios/shared" \
-H "Authorization: Bearer eq_your_api_key"import requests
r = requests.get(
"https://api.equibles.com/v1/portfolios/shared",
headers={"Authorization": "Bearer eq_your_api_key"},
)
print(r.json())const res = await fetch("https://api.equibles.com/v1/portfolios/shared", {
headers: { Authorization: "Bearer eq_your_api_key" },
});
console.log(await res.json());Response
The answer for an account without an organization.
{
"data": []
}
Response fields
| Field | Meaning |
|---|---|
data array |
One entry per portfolio. |
id string |
Id of the portfolio. |
name string |
Its name. |
currency string |
Currency of its totals. |
openLotCount integer |
Lots still held. |
closedLotCount integer |
Lots sold. |
createdAtUtc date and time |
When it was created, in UTC. |
access string |
What you can do with it: Owner, Edit (change lots and watches) or View. |
sharedBy string |
Who shared it with you. Not sent for your own. |
Good to know
- When your organization requires its own sign-in, link it once in the dashboard.
Create a portfolio
POST /v1/portfolios
Creates an empty portfolio. The answer is a 201.
Body
| Body field | Meaning |
|---|---|
name string required |
Name, up to 128 characters. You cannot have two with the same name. |
currency string |
Currency of its totals: USD, EUR, GBP, CHF, DKK, NOK, SEK, CNY, HKD, CAD, JPY, INR or BRL. Default: USD |
Request
curl -X POST "https://api.equibles.com/v1/portfolios" \
-H "Authorization: Bearer eq_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "Docs example REST"}'import requests
r = requests.post(
"https://api.equibles.com/v1/portfolios",
headers={"Authorization": "Bearer eq_your_api_key"},
json={"name": "Docs example REST"},
)
print(r.json())const res = await fetch("https://api.equibles.com/v1/portfolios", {
method: "POST",
headers: {
Authorization: "Bearer eq_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "Docs example REST" }),
});
console.log(await res.json());Response
{
"id": "4da84c34-22d2-4d3e-911b-8e9757650572",
"name": "Docs example REST",
"currency": "USD",
"openLotCount": 0,
"closedLotCount": 0,
"createdAtUtc": "2026-10-14T01:13:12.9067337Z",
"access": "Owner"
}
Response fields
| Field | Meaning |
|---|---|
id string |
Id of the portfolio. |
name string |
Its name. |
currency string |
Currency of its totals. |
openLotCount integer |
Lots still held. |
closedLotCount integer |
Lots sold. |
createdAtUtc date and time |
When it was created, in UTC. |
access string |
What you can do with it: Owner, Edit (change lots and watches) or View. |
Good to know
- A name you already use, or an eleventh portfolio, returns
400.
Portfolio detail
GET /v1/portfolios/{id}
One portfolio with prices: positions with their lots, watched instruments and sales.
Parameters
| Parameter | Meaning |
|---|---|
id string, in the path required |
Id of the portfolio. |
Request
curl "https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572" \
-H "Authorization: Bearer eq_your_api_key"import requests
r = requests.get(
"https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572",
headers={"Authorization": "Bearer eq_your_api_key"},
)
print(r.json())const res = await fetch("https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572", {
headers: { Authorization: "Bearer eq_your_api_key" },
});
console.log(await res.json());Response
{
"id": "4da84c34-22d2-4d3e-911b-8e9757650572",
"name": "Docs example REST",
"access": "Owner",
"asOfUtc": "2026-10-14T01:13:37.7803838Z",
"currency": "USD",
"conversionRates": [],
"costBasis": 7220.000000000000,
"marketValue": 16310.800000000000000000,
"unrealizedGain": 9090.800000000000000000,
"unrealizedGainPercent": 125.9114,
"realizedGain": 1043.250000000000,
"unconvertedClosedLotCount": 0,
"unvaluedPositionCount": 0,
"unconvertedPositionCount": 0,
"coverageNote": null,
"positions": [
{
"instrumentKind": "Stock",
"ticker": "NVDA",
"exchange": null,
"name": "Nvidia Corp",
"occTicker": null,
"expirationDate": null,
"strikePrice": null,
"contractType": null,
"sharesPerContract": null,
"quantity": 40.000000,
"currency": "USD",
"costBasis": 4740.000000000000,
"averageCostPerUnit": 118.500000,
"markPerUnit": 228.520000000000,
"markSource": "SettledClose",
"markAsOf": "2026-10-13",
"markTimeUtc": null,
"markUnavailableReason": null,
"marketValue": 9140.800000000000000000,
"unrealizedGain": 4400.800000000000000000,
"unrealizedGainPercent": 92.8439,
"expired": false,
"convertedCostBasis": 4740.000000000000,
"convertedMarketValue": 9140.800000000000000000,
"convertedUnrealizedGain": 4400.800000000000000000,
"convertedUnrealizedGainPercent": 92.8439,
"conversionUnavailableReason": null,
"lots": [
{
"id": "7e5b105f-b4be-42ab-9ef3-dc42d03fd990",
"instrumentKind": "Stock",
"ticker": "NVDA",
"exchange": null,
"name": "Nvidia Corp",
"occTicker": null,
"expirationDate": null,
"strikePrice": null,
"contractType": null,
"sharesPerContract": null,
"quantity": 40.000000,
"costPerUnit": 118.500000,
"costBasis": 4740.000000000000,
"currency": "USD",
"purchaseFxRate": null,
"purchaseFxCurrency": null,
"acquiredDate": "2025-09-02",
"note": "core position",
"closedDate": null,
"closePricePerUnit": null,
"marketValue": 9140.800000000000000000,
"unrealizedGain": 4400.800000000000000000,
"realizedGain": null,
"convertedCostBasis": 4740.000000000000,
"convertedMarketValue": 9140.800000000000000000,
"convertedUnrealizedGain": 4400.800000000000000000,
"convertedRealizedGain": null,
"purchaseRate": {
"from": "USD",
"to": "USD",
"rate": 1.0,
"asOf": null
},
"closeRate": null,
"isOpen": true
}
]
},
{
"instrumentKind": "Option",
"ticker": "NVDA",
"exchange": null,
"name": "NVIDIA Corporation Common Stock",
"occTicker": "O:NVDA270115C00200000",
"expirationDate": "2027-01-15",
"strikePrice": 200.0000,
"contractType": "Call",
"sharesPerContract": 100,
"quantity": 2.000000,
"currency": "USD",
"costBasis": 2480.000000000000,
"averageCostPerUnit": 12.400000,
"markPerUnit": 35.85,
"markSource": "OptionDailyClose",
"markAsOf": "2026-10-13",
"markTimeUtc": null,
"markUnavailableReason": null,
"marketValue": 7170.00000000,
"unrealizedGain": 4690.000000000000,
"unrealizedGainPercent": 189.1129,
"expired": false,
"convertedCostBasis": 2480.000000000000,
"convertedMarketValue": 7170.00000000,
"convertedUnrealizedGain": 4690.000000000000,
"convertedUnrealizedGainPercent": 189.1129,
"conversionUnavailableReason": null,
"lots": [
{
"id": "42c30d6f-7b7a-4d6a-b7b0-fe52f3907f11",
"instrumentKind": "Option",
"ticker": "NVDA",
"exchange": null,
"name": "NVIDIA Corporation Common Stock",
"occTicker": "O:NVDA270115C00200000",
"expirationDate": "2027-01-15",
"strikePrice": 200.0000,
"contractType": "Call",
"sharesPerContract": 100,
"quantity": 2.000000,
"costPerUnit": 12.400000,
"costBasis": 2480.000000000000,
"currency": "USD",
"purchaseFxRate": null,
"purchaseFxCurrency": null,
"acquiredDate": "2026-03-17",
"note": null,
"closedDate": null,
"closePricePerUnit": null,
"marketValue": 7170.00000000,
"unrealizedGain": 4690.000000000000,
"realizedGain": null,
"convertedCostBasis": 2480.000000000000,
"convertedMarketValue": 7170.00000000,
"convertedUnrealizedGain": 4690.000000000000,
"convertedRealizedGain": null,
"purchaseRate": {
"from": "USD",
"to": "USD",
"rate": 1.0,
"asOf": null
},
"closeRate": null,
"isOpen": true
}
]
}
],
"watching": [
{
"id": "9371c245-9cf4-47e2-be3f-41930730959d",
"instrumentKind": "Stock",
"ticker": "AMD",
"exchange": null,
"name": "Advanced Micro Devices Inc",
"occTicker": null,
"expirationDate": null,
"strikePrice": null,
"contractType": null,
"sharesPerContract": null,
"currency": "USD",
"markPerUnit": 605.530000000000,
"markSource": "SettledClose",
"markAsOf": "2026-10-13",
"markUnavailableReason": null,
"expired": false
},
{
"id": "0c0e576c-dc0b-4dd3-9c9f-d65226da446d",
"instrumentKind": "Option",
"ticker": "AMD",
"exchange": null,
"name": "Advanced Micro Devices, Inc. Common Stock",
"occTicker": "O:AMD270115C00200000",
"expirationDate": "2027-01-15",
"strikePrice": 200.0000,
"contractType": "Call",
"sharesPerContract": 100,
"currency": "USD",
"markPerUnit": 399.9,
"markSource": "OptionDailyClose",
"markAsOf": "2026-10-13",
"markUnavailableReason": null,
"expired": false
}
],
"closedLots": [
{
"id": "da9ec772-bd54-45c7-84b0-619df7bf97b3",
"instrumentKind": "Stock",
"ticker": "MSFT",
"exchange": null,
"name": "Microsoft Corp",
"occTicker": null,
"expirationDate": null,
"strikePrice": null,
"contractType": null,
"sharesPerContract": null,
"quantity": 15.000000,
"costPerUnit": 402.100000,
"costBasis": 6031.500000000000,
"currency": "USD",
"purchaseFxRate": null,
"purchaseFxCurrency": null,
"acquiredDate": "2025-11-04",
"note": null,
"closedDate": "2026-06-26",
"closePricePerUnit": 471.650000,
"marketValue": null,
"unrealizedGain": null,
"realizedGain": 1043.250000000000,
"convertedCostBasis": 6031.500000000000,
"convertedMarketValue": null,
"convertedUnrealizedGain": null,
"convertedRealizedGain": 1043.250000000000,
"purchaseRate": {
"from": "USD",
"to": "USD",
"rate": 1.0,
"asOf": null
},
"closeRate": {
"from": "USD",
"to": "USD",
"rate": 1.0,
"asOf": null
},
"isOpen": false
}
]
}
Response fields
| Field | Meaning |
|---|---|
id string |
Id of the portfolio. |
name string |
Its name. |
access string |
What you can do with it: Owner, Edit (change lots and watches) or View. |
sharedBy string |
Who shared it with you. Not sent for your own. |
asOfUtc date and time |
Time of this answer, in UTC. |
currency string |
Currency of every total. |
conversionRates array |
Exchange rates used for the values. Empty when everything is in currency. |
from string |
Currency converted from. |
to string |
Currency converted to. |
rate number |
Units of to for one of from. |
asOf date |
Day of the rate. |
costBasis number |
Paid for every open lot that can be converted. |
marketValue number |
Value of the positions with a price. null when none has one. |
unrealizedGain number |
Gain of the positions with a price. null when none has one. |
unrealizedGainPercent number |
Gain of the positions with a price, in percent. null when none has one. |
realizedGain number |
Gain of the lots sold. |
unconvertedClosedLotCount integer |
Lots sold that could not be converted, so they are not in realizedGain. |
unvaluedPositionCount integer |
Positions without a price, so they are not in the totals. |
unconvertedPositionCount integer |
Positions that could not be converted, so they are not in the totals. |
coverageNote string |
Why some positions were not priced. null when there is no limit. |
positions array |
One entry per instrument held. |
instrumentKind string |
Stock, Option or Crypto. |
ticker string |
Symbol. For an option, that of its underlying. |
exchange string |
Market code of the exchange. null in the US. |
name string |
Name of the company or fund, or pair of the coin, such as BTC/USD. |
occTicker string |
Option symbol. null when it is not an option. |
expirationDate date |
Expiration. null when it is not an option. |
strikePrice number |
Strike. null when it is not an option. |
contractType string |
Call or Put. null when it is not an option. |
sharesPerContract integer |
Shares of one contract. null when it is not an option. |
quantity number |
Quantity held. Negative for a short position or a written option. |
currency string |
Currency of the prices and gains below. null when the lots have different ones. |
costBasis number |
Paid for it. |
averageCostPerUnit number |
Average price paid. |
markPerUnit number |
Price it is valued at. null without one. |
markSource string |
Where the price comes from. See How a portfolio is priced. null without a price. |
markAsOf date |
Trading day of the price. null when it is not known. |
markTimeUtc date and time |
Time of the price, in UTC. Only for the trade of a coin, otherwise null. |
markUnavailableReason string |
Why there is no price. null when there is one. |
marketValue number |
Its value. null without a price. |
unrealizedGain number |
Its gain. null without a price. |
unrealizedGainPercent number |
Its gain, in percent. null without a price. |
expired boolean |
true for an option past its expiration, which is not priced. |
convertedCostBasis number |
Paid for it, in the currency of the portfolio. null without a rate. |
convertedMarketValue number |
Its value, in the currency of the portfolio. null without a rate. |
convertedUnrealizedGain number |
Its gain, in the currency of the portfolio, with the change of the rate. null without a rate. |
convertedUnrealizedGainPercent number |
Its gain, in percent of convertedCostBasis. null without a rate. |
conversionUnavailableReason string |
Why it could not be converted. null when it could. |
lots array |
One entry per open lot. |
id string |
Id of the lot. |
instrumentKind string |
Stock, Option or Crypto. |
ticker string |
Symbol. For an option, that of its underlying. |
exchange string |
Market code of the exchange. null in the US. |
name string |
Name of the company or fund, or pair of the coin, such as BTC/USD. |
occTicker string |
Option symbol. null when it is not an option. |
expirationDate date |
Expiration. null when it is not an option. |
strikePrice number |
Strike. null when it is not an option. |
contractType string |
Call or Put. null when it is not an option. |
sharesPerContract integer |
Shares of one contract. null when it is not an option. |
quantity number |
Quantity. Negative for a short sale or a written option. |
costPerUnit number |
Price paid or received, always positive. For an option, per share and not per contract. |
costBasis number |
Paid for it. |
currency string |
Currency of the prices and gains. |
purchaseFxRate number |
Exchange rate of the broker, recorded with the lot. null without one. |
purchaseFxCurrency string |
Currency purchaseFxRate converts to. null without one. |
acquiredDate date |
Day it was bought. |
note string |
Your note. null without one. |
syncedFrom string |
Broker it is synced from: InteractiveBrokers, Trading212, Etoro, Bitpanda, Fidelity or CsvFile. Not sent for a lot you entered. |
closedDate date |
Day it was sold. null while open. |
closePricePerUnit number |
Price it was sold at. null while open. |
marketValue number |
Its value. null without a price. |
unrealizedGain number |
Its gain. null without a price. |
realizedGain number |
Gain of the sale. null while open. |
convertedCostBasis number |
Paid for it, in the currency of the portfolio. null without a rate. |
convertedMarketValue number |
Its value, in the currency of the portfolio. null without a rate. |
convertedUnrealizedGain number |
Its gain, in the currency of the portfolio. null without a rate. |
convertedRealizedGain number |
Gain of the sale, in the currency of the portfolio. null while open or without a rate. |
purchaseRate object |
Rate on the day it was bought. null when not needed. Same fields as conversionRates. |
closeRate object |
Rate on the day it was sold. null while open or when not needed. Same fields as conversionRates. |
isOpen boolean |
true while held. |
watching array |
One entry per instrument watched and not held. |
id string |
Id of the watch. |
instrumentKind string |
Stock or Option. |
ticker string |
Symbol. For an option, that of its underlying. |
exchange string |
Market code of the exchange. null in the US. |
name string |
Name of the company or fund. |
occTicker string |
Option symbol. null when it is not an option. |
expirationDate date |
Expiration. null when it is not an option. |
strikePrice number |
Strike. null when it is not an option. |
contractType string |
Call or Put. null when it is not an option. |
sharesPerContract integer |
Shares of one contract. null when it is not an option. |
currency string |
Currency of the price. null when unknown. |
markPerUnit number |
Its price. null without one. |
markSource string |
Where the price comes from. null without one. |
markAsOf date |
Trading day of the price. null when it is not known. |
markUnavailableReason string |
Why there is no price. null when there is one. |
expired boolean |
true for an option past its expiration, which is not priced. |
closedLots array |
One entry per lot sold, newest first. Same fields as positions.lots. |
Good to know
- Percentages are plain numbers.
125.9114is 125.9114%.
Add a lot
POST /v1/portfolios/{id}/lots
Adds a lot to a portfolio. The answer is a 201.
Parameters
| Parameter | Meaning |
|---|---|
id string, in the path required |
Id of the portfolio. |
Body
| Body field | Meaning |
|---|---|
ticker string |
Symbol, or MIC:TICKER outside the US, such as XPAR:AIR. For an option, that of its underlying. Required without crypto. |
crypto string |
Symbol of a coin, such as BTC. Send it instead of ticker. |
optionContract string |
Option symbol, such as O:AAPL260116C00250000. Only for an option. |
quantity number required |
Shares, contracts or coins. Negative for a short sale or a written option. |
costPerUnit number required |
Price paid or received, always positive. For an option, per share and not per contract. |
acquiredDate date required |
Day it was bought, yyyy-MM-dd. It cannot be in the future. |
note string |
A note, up to 256 characters. |
fxRate number |
Exchange rate of your broker: units of the currency of the portfolio for one of the lot. Default: the official rate of acquiredDate |
Request
curl -X POST "https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots" \
-H "Authorization: Bearer eq_your_api_key" \
-H "Content-Type: application/json" \
-d '{"ticker": "NVDA", "optionContract": "O:NVDA270115C00200000", "quantity": 2, "costPerUnit": 12.40, "acquiredDate": "2026-03-17"}'import requests
r = requests.post(
"https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots",
headers={"Authorization": "Bearer eq_your_api_key"},
json={
"ticker": "NVDA",
"optionContract": "O:NVDA270115C00200000",
"quantity": 2,
"costPerUnit": 12.40,
"acquiredDate": "2026-03-17",
},
)
print(r.json())const res = await fetch("https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots", {
method: "POST",
headers: {
Authorization: "Bearer eq_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
ticker: "NVDA",
optionContract: "O:NVDA270115C00200000",
quantity: 2,
costPerUnit: 12.4,
acquiredDate: "2026-03-17",
}),
});
console.log(await res.json());Response
{
"portfolioId": "4da84c34-22d2-4d3e-911b-8e9757650572",
"portfolioName": "Docs example REST",
"deduplicated": false,
"lot": {
"id": "42c30d6f-7b7a-4d6a-b7b0-fe52f3907f11",
"instrumentKind": "Option",
"ticker": "NVDA",
"exchange": null,
"name": "NVIDIA Corporation Common Stock",
"occTicker": "O:NVDA270115C00200000",
"expirationDate": "2027-01-15",
"strikePrice": 200.0,
"contractType": "Call",
"sharesPerContract": 100,
"quantity": 2.0,
"costPerUnit": 12.40,
"costBasis": 2480.00,
"currency": "USD",
"purchaseFxRate": null,
"purchaseFxCurrency": null,
"acquiredDate": "2026-03-17",
"note": null,
"closedDate": null,
"closePricePerUnit": null,
"marketValue": null,
"unrealizedGain": null,
"realizedGain": null,
"convertedCostBasis": null,
"convertedMarketValue": null,
"convertedUnrealizedGain": null,
"convertedRealizedGain": null,
"purchaseRate": null,
"closeRate": null,
"isOpen": true
}
}
Response fields
| Field | Meaning |
|---|---|
portfolioId string |
Id of the portfolio. |
portfolioName string |
Its name. |
deduplicated boolean |
true when the same request had already added the lot, so nothing was added. |
lot object |
The lot, without a price. |
id string |
Id of the lot. |
instrumentKind string |
Stock, Option or Crypto. |
ticker string |
Symbol. For an option, that of its underlying. |
exchange string |
Market code of the exchange. null in the US. |
name string |
Name of the company or fund, or pair of the coin, such as BTC/USD. |
occTicker string |
Option symbol. null when it is not an option. |
expirationDate date |
Expiration. null when it is not an option. |
strikePrice number |
Strike. null when it is not an option. |
contractType string |
Call or Put. null when it is not an option. |
sharesPerContract integer |
Shares of one contract. null when it is not an option. |
quantity number |
Quantity. Negative for a short sale or a written option. |
costPerUnit number |
Price paid or received, always positive. For an option, per share and not per contract. |
costBasis number |
Paid for it. |
currency string |
Currency of the prices and gains. |
purchaseFxRate number |
Exchange rate of the broker, recorded with the lot. null without one. |
purchaseFxCurrency string |
Currency purchaseFxRate converts to. null without one. |
acquiredDate date |
Day it was bought. |
note string |
Your note. null without one. |
syncedFrom string |
Broker it is synced from: InteractiveBrokers, Trading212, Etoro, Bitpanda, Fidelity or CsvFile. Not sent for a lot you entered. |
closedDate date |
Day it was sold. null while open. |
closePricePerUnit number |
Price it was sold at. null while open. |
marketValue number |
Its value. null without a price. |
unrealizedGain number |
Its gain. null without a price. |
realizedGain number |
Gain of the sale. null while open. |
convertedCostBasis number |
Paid for it, in the currency of the portfolio. null without a rate. |
convertedMarketValue number |
Its value, in the currency of the portfolio. null without a rate. |
convertedUnrealizedGain number |
Its gain, in the currency of the portfolio. null without a rate. |
convertedRealizedGain number |
Gain of the sale, in the currency of the portfolio. null while open or without a rate. |
purchaseRate object |
Rate on the day it was bought. null when not needed. |
from string |
Currency converted from. |
to string |
Currency converted to. |
rate number |
Units of to for one of from. |
asOf date |
Day of the rate. |
closeRate object |
Rate on the day it was sold. null while open or when not needed. Same fields as lot.purchaseRate. |
isOpen boolean |
true while held. |
Good to know
- You can repeat a request safely. The same one within a few minutes returns the lot already added, with
deduplicatedastrueand a200. - The lot has no price in this answer. Read the portfolio for its value.
Update a lot
PATCH /v1/portfolios/{id}/lots/{lotId}
Corrects a lot. Only the fields you send change.
Parameters
| Parameter | Meaning |
|---|---|
id string, in the path required |
Id of the portfolio. |
lotId string, in the path required |
Id of the lot. |
Body
| Body field | Meaning |
|---|---|
quantity number |
Shares, contracts or coins. Negative for a short sale or a written option. |
costPerUnit number |
Price paid or received, always positive. |
acquiredDate date |
Day it was bought, yyyy-MM-dd. |
note string |
A note. Send an empty one to remove it. |
fxRate number |
Exchange rate of your broker: units of the currency of the portfolio for one of the lot. |
clearFxRate boolean |
true removes the rate of your broker. Cannot be sent with fxRate. |
Request
curl -X PATCH "https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/7e5b105f-b4be-42ab-9ef3-dc42d03fd990" \
-H "Authorization: Bearer eq_your_api_key" \
-H "Content-Type: application/json" \
-d '{"costPerUnit": 118.50, "note": "core position"}'import requests
r = requests.patch(
"https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/7e5b105f-b4be-42ab-9ef3-dc42d03fd990",
headers={"Authorization": "Bearer eq_your_api_key"},
json={"costPerUnit": 118.50, "note": "core position"},
)
print(r.json())const res = await fetch("https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/7e5b105f-b4be-42ab-9ef3-dc42d03fd990", {
method: "PATCH",
headers: {
Authorization: "Bearer eq_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({ costPerUnit: 118.5, note: "core position" }),
});
console.log(await res.json());Response
{
"portfolioId": "4da84c34-22d2-4d3e-911b-8e9757650572",
"portfolioName": "Docs example REST",
"deduplicated": false,
"lot": {
"id": "7e5b105f-b4be-42ab-9ef3-dc42d03fd990",
"instrumentKind": "Stock",
"ticker": "NVDA",
"exchange": null,
"name": "Nvidia Corp",
"occTicker": null,
"expirationDate": null,
"strikePrice": null,
"contractType": null,
"sharesPerContract": null,
"quantity": 40.000000,
"costPerUnit": 118.50,
"costBasis": 4740.00000000,
"currency": "USD",
"purchaseFxRate": null,
"purchaseFxCurrency": null,
"acquiredDate": "2025-09-02",
"note": "core position",
"closedDate": null,
"closePricePerUnit": null,
"marketValue": null,
"unrealizedGain": null,
"realizedGain": null,
"convertedCostBasis": null,
"convertedMarketValue": null,
"convertedUnrealizedGain": null,
"convertedRealizedGain": null,
"purchaseRate": null,
"closeRate": null,
"isOpen": true
}
}
Response fields
| Field | Meaning |
|---|---|
portfolioId string |
Id of the portfolio. |
portfolioName string |
Its name. |
deduplicated boolean |
true when the same request had already added the lot, so nothing was added. |
lot object |
The lot, without a price. |
id string |
Id of the lot. |
instrumentKind string |
Stock, Option or Crypto. |
ticker string |
Symbol. For an option, that of its underlying. |
exchange string |
Market code of the exchange. null in the US. |
name string |
Name of the company or fund, or pair of the coin, such as BTC/USD. |
occTicker string |
Option symbol. null when it is not an option. |
expirationDate date |
Expiration. null when it is not an option. |
strikePrice number |
Strike. null when it is not an option. |
contractType string |
Call or Put. null when it is not an option. |
sharesPerContract integer |
Shares of one contract. null when it is not an option. |
quantity number |
Quantity. Negative for a short sale or a written option. |
costPerUnit number |
Price paid or received, always positive. For an option, per share and not per contract. |
costBasis number |
Paid for it. |
currency string |
Currency of the prices and gains. |
purchaseFxRate number |
Exchange rate of the broker, recorded with the lot. null without one. |
purchaseFxCurrency string |
Currency purchaseFxRate converts to. null without one. |
acquiredDate date |
Day it was bought. |
note string |
Your note. null without one. |
syncedFrom string |
Broker it is synced from: InteractiveBrokers, Trading212, Etoro, Bitpanda, Fidelity or CsvFile. Not sent for a lot you entered. |
closedDate date |
Day it was sold. null while open. |
closePricePerUnit number |
Price it was sold at. null while open. |
marketValue number |
Its value. null without a price. |
unrealizedGain number |
Its gain. null without a price. |
realizedGain number |
Gain of the sale. null while open. |
convertedCostBasis number |
Paid for it, in the currency of the portfolio. null without a rate. |
convertedMarketValue number |
Its value, in the currency of the portfolio. null without a rate. |
convertedUnrealizedGain number |
Its gain, in the currency of the portfolio. null without a rate. |
convertedRealizedGain number |
Gain of the sale, in the currency of the portfolio. null while open or without a rate. |
purchaseRate object |
Rate on the day it was bought. null when not needed. |
from string |
Currency converted from. |
to string |
Currency converted to. |
rate number |
Units of to for one of from. |
asOf date |
Day of the rate. |
closeRate object |
Rate on the day it was sold. null while open or when not needed. Same fields as lot.purchaseRate. |
isOpen boolean |
true while held. |
Good to know
- The instrument cannot change. Remove the lot and add the right one.
- The lot has no price in this answer. Read the portfolio for its value.
Close a lot
POST /v1/portfolios/{id}/lots/{lotId}/close
Records the sale of a lot, or of part of it.
Parameters
| Parameter | Meaning |
|---|---|
id string, in the path required |
Id of the portfolio. |
lotId string, in the path required |
Id of the lot. |
Body
| Body field | Meaning |
|---|---|
closePricePerUnit number required |
Price it was sold at, always positive. For an option, per share and not per contract. |
closeDate date required |
Day it was sold, yyyy-MM-dd. It cannot be before it was bought. |
quantity number |
How much was sold, always positive. Default: all of it |
Request
curl -X POST "https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/da9ec772-bd54-45c7-84b0-619df7bf97b3/close" \
-H "Authorization: Bearer eq_your_api_key" \
-H "Content-Type: application/json" \
-d '{"closePricePerUnit": 471.65, "closeDate": "2026-06-26"}'import requests
r = requests.post(
"https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/da9ec772-bd54-45c7-84b0-619df7bf97b3/close",
headers={"Authorization": "Bearer eq_your_api_key"},
json={"closePricePerUnit": 471.65, "closeDate": "2026-06-26"},
)
print(r.json())const res = await fetch("https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/da9ec772-bd54-45c7-84b0-619df7bf97b3/close", {
method: "POST",
headers: {
Authorization: "Bearer eq_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({ closePricePerUnit: 471.65, closeDate: "2026-06-26" }),
});
console.log(await res.json());Response
{
"portfolioId": "4da84c34-22d2-4d3e-911b-8e9757650572",
"portfolioName": "Docs example REST",
"deduplicated": false,
"lot": {
"id": "da9ec772-bd54-45c7-84b0-619df7bf97b3",
"instrumentKind": "Stock",
"ticker": "MSFT",
"exchange": null,
"name": "Microsoft Corp",
"occTicker": null,
"expirationDate": null,
"strikePrice": null,
"contractType": null,
"sharesPerContract": null,
"quantity": 15.000000,
"costPerUnit": 402.100000,
"costBasis": 6031.500000000000,
"currency": "USD",
"purchaseFxRate": null,
"purchaseFxCurrency": null,
"acquiredDate": "2025-11-04",
"note": null,
"closedDate": "2026-06-26",
"closePricePerUnit": 471.65,
"marketValue": null,
"unrealizedGain": null,
"realizedGain": 1043.250000000000,
"convertedCostBasis": null,
"convertedMarketValue": null,
"convertedUnrealizedGain": null,
"convertedRealizedGain": null,
"purchaseRate": null,
"closeRate": null,
"isOpen": false
}
}
Response fields
| Field | Meaning |
|---|---|
portfolioId string |
Id of the portfolio. |
portfolioName string |
Its name. |
deduplicated boolean |
true when the same request had already added the lot, so nothing was added. |
lot object |
The lot, without a price. |
id string |
Id of the lot. |
instrumentKind string |
Stock, Option or Crypto. |
ticker string |
Symbol. For an option, that of its underlying. |
exchange string |
Market code of the exchange. null in the US. |
name string |
Name of the company or fund, or pair of the coin, such as BTC/USD. |
occTicker string |
Option symbol. null when it is not an option. |
expirationDate date |
Expiration. null when it is not an option. |
strikePrice number |
Strike. null when it is not an option. |
contractType string |
Call or Put. null when it is not an option. |
sharesPerContract integer |
Shares of one contract. null when it is not an option. |
quantity number |
Quantity. Negative for a short sale or a written option. |
costPerUnit number |
Price paid or received, always positive. For an option, per share and not per contract. |
costBasis number |
Paid for it. |
currency string |
Currency of the prices and gains. |
purchaseFxRate number |
Exchange rate of the broker, recorded with the lot. null without one. |
purchaseFxCurrency string |
Currency purchaseFxRate converts to. null without one. |
acquiredDate date |
Day it was bought. |
note string |
Your note. null without one. |
syncedFrom string |
Broker it is synced from: InteractiveBrokers, Trading212, Etoro, Bitpanda, Fidelity or CsvFile. Not sent for a lot you entered. |
closedDate date |
Day it was sold. null while open. |
closePricePerUnit number |
Price it was sold at. null while open. |
marketValue number |
Its value. null without a price. |
unrealizedGain number |
Its gain. null without a price. |
realizedGain number |
Gain of the sale. null while open. |
convertedCostBasis number |
Paid for it, in the currency of the portfolio. null without a rate. |
convertedMarketValue number |
Its value, in the currency of the portfolio. null without a rate. |
convertedUnrealizedGain number |
Its gain, in the currency of the portfolio. null without a rate. |
convertedRealizedGain number |
Gain of the sale, in the currency of the portfolio. null while open or without a rate. |
purchaseRate object |
Rate on the day it was bought. null when not needed. |
from string |
Currency converted from. |
to string |
Currency converted to. |
rate number |
Units of to for one of from. |
asOf date |
Day of the rate. |
closeRate object |
Rate on the day it was sold. null while open or when not needed. Same fields as lot.purchaseRate. |
isOpen boolean |
true while held. |
Good to know
- Selling part splits the lot. The answer has the part sold, with its own
id, and the rest stays open at its price.
Remove a lot
DELETE /v1/portfolios/{id}/lots/{lotId}
Removes a lot added by mistake. The answer is a 204 without content. It cannot be undone.
Parameters
| Parameter | Meaning |
|---|---|
id string, in the path required |
Id of the portfolio. |
lotId string, in the path required |
Id of the lot. |
Request
curl -X DELETE "https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/42c30d6f-7b7a-4d6a-b7b0-fe52f3907f11" \
-H "Authorization: Bearer eq_your_api_key"import requests
r = requests.delete(
"https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/42c30d6f-7b7a-4d6a-b7b0-fe52f3907f11",
headers={"Authorization": "Bearer eq_your_api_key"},
)
print(r.status_code)const res = await fetch("https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/lots/42c30d6f-7b7a-4d6a-b7b0-fe52f3907f11", {
method: "DELETE",
headers: { Authorization: "Bearer eq_your_api_key" },
});
console.log(res.status);Good to know
- To record a sale, use Close a lot, which keeps its gain.
Watch an instrument
POST /v1/portfolios/{id}/watches
Watches a stock or an option without holding it. The answer is a 201.
Parameters
| Parameter | Meaning |
|---|---|
id string, in the path required |
Id of the portfolio. |
Body
| Body field | Meaning |
|---|---|
ticker string required |
Symbol, or MIC:TICKER outside the US, such as XPAR:AIR. For an option, that of its underlying. |
optionContract string |
Option symbol, such as O:AAPL260116C00250000. Only for an option. |
Request
curl -X POST "https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/watches" \
-H "Authorization: Bearer eq_your_api_key" \
-H "Content-Type: application/json" \
-d '{"ticker": "AMD"}'import requests
r = requests.post(
"https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/watches",
headers={"Authorization": "Bearer eq_your_api_key"},
json={"ticker": "AMD"},
)
print(r.json())const res = await fetch("https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/watches", {
method: "POST",
headers: {
Authorization: "Bearer eq_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({ ticker: "AMD" }),
});
console.log(await res.json());Response
{
"portfolioId": "4da84c34-22d2-4d3e-911b-8e9757650572",
"portfolioName": "Docs example REST",
"watch": {
"id": "9371c245-9cf4-47e2-be3f-41930730959d",
"instrumentKind": "Stock",
"ticker": "AMD",
"exchange": null,
"name": "Advanced Micro Devices Inc",
"occTicker": null,
"expirationDate": null,
"strikePrice": null,
"contractType": null,
"sharesPerContract": null,
"currency": null,
"markPerUnit": null,
"markSource": null,
"markAsOf": null,
"markUnavailableReason": null,
"expired": false
}
}
Response fields
| Field | Meaning |
|---|---|
portfolioId string |
Id of the portfolio. |
portfolioName string |
Its name. |
watch object |
The watch, without a price. |
id string |
Id of the watch. |
instrumentKind string |
Stock or Option. |
ticker string |
Symbol. For an option, that of its underlying. |
exchange string |
Market code of the exchange. null in the US. |
name string |
Name of the company or fund. |
occTicker string |
Option symbol. null when it is not an option. |
expirationDate date |
Expiration. null when it is not an option. |
strikePrice number |
Strike. null when it is not an option. |
contractType string |
Call or Put. null when it is not an option. |
sharesPerContract integer |
Shares of one contract. null when it is not an option. |
currency string |
Currency of the price. null when unknown. |
markPerUnit number |
Its price. null without one. |
markSource string |
Where the price comes from. null without one. |
markAsOf date |
Trading day of the price. null when it is not known. |
markUnavailableReason string |
Why there is no price. null when there is one. |
expired boolean |
true for an option past its expiration, which is not priced. |
Good to know
- An instrument already watched, or an unknown one, returns
400. - The watch has no price in this answer. Read the portfolio for it.
- For an option, send both fields:
{"ticker": "AMD", "optionContract": "O:AMD270115C00200000"}.
Unwatch an instrument
DELETE /v1/portfolios/{id}/watches/{watchId}
Stops watching an instrument. Lots are not touched. The answer is a 204 without content.
Parameters
| Parameter | Meaning |
|---|---|
id string, in the path required |
Id of the portfolio. |
watchId string, in the path required |
Id of the watch. |
Request
curl -X DELETE "https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/watches/9371c245-9cf4-47e2-be3f-41930730959d" \
-H "Authorization: Bearer eq_your_api_key"import requests
r = requests.delete(
"https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/watches/9371c245-9cf4-47e2-be3f-41930730959d",
headers={"Authorization": "Bearer eq_your_api_key"},
)
print(r.status_code)const res = await fetch("https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572/watches/9371c245-9cf4-47e2-be3f-41930730959d", {
method: "DELETE",
headers: { Authorization: "Bearer eq_your_api_key" },
});
console.log(res.status);Delete a portfolio
DELETE /v1/portfolios/{id}
Deletes a portfolio with all its lots and gains. The answer is a 204 without content. It cannot be undone.
Parameters
| Parameter | Meaning |
|---|---|
id string, in the path required |
Id of the portfolio. |
Request
curl -X DELETE "https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572" \
-H "Authorization: Bearer eq_your_api_key"import requests
r = requests.delete(
"https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572",
headers={"Authorization": "Bearer eq_your_api_key"},
)
print(r.status_code)const res = await fetch("https://api.equibles.com/v1/portfolios/4da84c34-22d2-4d3e-911b-8e9757650572", {
method: "DELETE",
headers: { Authorization: "Bearer eq_your_api_key" },
});
console.log(res.status);Good to know
- Only who created it can delete it. Others get a
403.
Privacy
A portfolio belongs to your account. It is never used for market data or any public dataset, and no other account sees it unless you share it with your organization.