Private Security¶
Endpoints
POST /private_securities
GET /private_securities
GET /private_securities/:id
PUT /private_securities/:id
DELETE /private_securities/:id
A private security is a proprietary instrument that is not publicly traded. It allows you to define custom securities with their own pricing data, instrument type, and currency for use in portfolio calculations.
Not bound to a workspace
Private securities are scoped to the account, not to a workspace. Every workspace in the account sees the same private securities.
The symbol must match the pattern ^PRIVATE:[A-Z0-9_]*$: the PRIVATE: prefix followed by uppercase letters, digits and underscores, for example PRIVATE:MYSECURITY.
The private security object¶
What a private security object looks like?
{
"symbol": "PRIVATE:MYSECURITY",
"name": "My Private Security",
"description": "This is my first private security",
"instrument_type": "EQUITY",
"currency": "USD",
"tags": ["first", "private", "20210622"],
"data": {},
"created": 1625598288,
"updated": 1625598288
}
| Property | Description |
|---|---|
symbol string |
Unique identifier for the private security. Must match ^PRIVATE:[A-Z0-9_]*$. |
created timestamp |
Time at which the object was created. Measured in seconds since the Unix epoch. |
updated timestamp |
Time at which the object was updated. Measured in seconds since the Unix epoch. |
name string |
The name of the private security. |
description string |
An arbitrary string attached to the private security. Often useful for finding detailed information or for filtering a search based on the present hashtags. |
tags array |
Sequence of hashtags used to find the related private security. The more hashtags that are used, the more elements that are filtered out from the search. Labels, dates and any other hashtag can be used. |
instrument_type string |
The type of financial instrument (e.g. EQUITY, FIXED_INCOME). |
currency string |
3-letter ISO 4217 code for the security's currency. |
data object |
The custom data associated with the private security. |
version string |
Indicates the private security's current version. |
Create a private security¶
Creates and then returns the new private security.
To create a new private security, run the following:
curl https://api.everysk.com/v2/private_securities \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-d '{
"symbol": "PRIVATE:MYSECURITY",
"name": "My Private Security",
"description": "This is my first private security",
"type": "EQUITY",
"currency": "USD",
"tags": ["first", "private", "20210622"],
"data": {}
}' \
-X POST
The above call returns the following JSON object:
{
"private_security": {
"symbol": "PRIVATE:MYSECURITY",
"name": "My Private Security",
"description": "This is my first private security",
"instrument_type": "EQUITY",
"currency": "USD",
"tags": ["first", "private", "20210622"],
"data": {},
"created": 1625598288,
"updated": 1625598288
}
}
HTTP Request
POST /private_securities
HTTP Parameters
| Parameter | Description |
|---|---|
symbol string |
REQUIRED A unique identifier (UID) for the private security. |
name string |
REQUIRED A string to identify the private security besides its symbol. |
description string |
optional, default is null Provides detailed information about your private security. You may add hashtags to create tags allowing you to search for them later. |
tags array |
optional, default is null Sequence of hashtags used to find the related private security. |
type string |
REQUIRED The type of financial instrument (e.g. EQUITY, FIXED_INCOME). |
currency string |
optional, default is USD 3-letter ISO 4217 code for the security's currency. |
data object |
REQUIRED The custom data associated with the private security. |
List all private securities¶
Returns a list of private securities you've previously created. The private securities are returned in sorted order, with the most recent appearing first.
To list all private securities, run the following:
The above call returns the following JSON object:
{
"private_securities": [
{
"symbol": "PRIVATE:MYSECURITY",
"name": "My Private Security",
"description": "This is my first private security",
"instrument_type": "EQUITY",
"currency": "USD",
"tags": ["first", "private", "20210622"],
"created": 1625598288,
"updated": 1625598288
},
...
],
"next_page_token": null
}
HTTP Request
GET /private_securities
HTTP Parameters
| Parameter | Description |
|---|---|
query string |
optional, default is null Request a list of private securities filtering it by name or tag. When using a tag to perform a query, each term must include a hashtag prefix. (e.g: query="#april #sample") See Filter with query. |
page_size integer |
optional, default is 10 Set the number of objects that will be listed per page. |
page_token integer |
optional, default is null The token defines which page will be returned to the user. For further information, please check out our pagination guide. |
Retrieve a private security¶
Retrieves the details of an existing private security by supplying its symbol.
To retrieve a private security, run the following:
The above call returns the following JSON object:
{
"private_security": {
"symbol": "PRIVATE:MYSECURITY",
"name": "My Private Security",
"description": "This is my first private security",
"instrument_type": "EQUITY",
"currency": "USD",
"tags": ["first", "private", "20210622"],
"data": {},
"created": 1625598288,
"updated": 1625598288
}
}
HTTP Request
GET /private_securities/:id
HTTP Parameters
| Parameter | Description |
|---|---|
symbol string |
REQUIRED A unique identifier (UID) for the private security. |
Update a private security¶
Updates a private security and then returns the updated object.
To update a private security, run the following:
The above call returns the following JSON object:
{
"private_security": {
"symbol": "PRIVATE:MYSECURITY",
"name": "My Updated Security",
"description": "Updated description",
"instrument_type": "EQUITY",
"currency": "USD",
"tags": ["first", "private", "20210622"],
"data": {},
"created": 1625598288,
"updated": 1625668154
}
}
HTTP Request
PUT /private_securities/:id
HTTP Parameters
| Parameter | Description |
|---|---|
symbol string |
REQUIRED A unique identifier (UID) for the private security. |
name string |
optional A string to identify the private security besides its symbol. |
description string |
optional Provides detailed information about your private security. |
tags array |
optional Sequence of hashtags used to find the related private security. |
type string |
optional The type of financial instrument. |
currency string |
optional 3-letter ISO 4217 code for the security's currency. |
data object |
optional The custom data associated with the private security. |
Delete a private security¶
To delete a private security, run the following:
The above call returns the following JSON object:
{
"private_security": {
"deleted": true,
"symbol": "PRIVATE:MYSECURITY",
"name": "My Private Security"
}
}
Permanently deletes a private security. It cannot be undone. Returns an object with the private security's symbol and an attribute specifying whether it was successfully deleted or not.
HTTP Request
DELETE /private_securities/:id
HTTP Parameters
| Parameter | Description |
|---|---|
symbol string |
REQUIRED A unique identifier (UID) for the private security. |