Custom Themes

Custom Themes are a great way to compile your own list of stocks to provide your users. Create your own themes and display them your platform with a nice UI.


Custom Themes

Returns all custom themes for the authenticated user, optionally filtered by region and localized by locale.

curl --request GET \
  --url 'https://api.getlaplace.com/api/v1/custom-theme?locale=en&region=us' \
  --header 'Authorization: Bearer your-api-key'

Parameters

NameDescriptionExampleParameter TypeData Type
locale
Locale code
querystring
region
Region code (Optional)
querystring

Response

(Note: Actual response can be different length and other fields may be present)

▼"root" : [ 1 items … ]
▼0 : { 12 items … }
"id" : string"672a58e165b9a4844a25260c"
"image" : string"https://finfree-storage.s3.eu-central-1.amazonaws.com/themes/us/video_oyunlari.png"
"order" : int0
"title" : string"Test Metadata16"
▼"region" : [ 1 items … ]
0 : string"us"
]
"status" : string"inactive"
"imageUrl" : string"https://finfree-storage.s3.eu-central-1.amazonaws.com/collection-images/videogames-stocks_original.webp"
▼"metaData" : { 1 items … }
"test" : boolfalse
}
"avatarUrl" : string""
"numStocks" : int7
"assetClass" : string"equity"
"description" : string"This is test 15 for metadata."
}
]

Get custom Theme Detail

Retrieves detailed information about a specific custom theme created by the authenticated user.

The locale parameter controls text localization. The optional sortBy parameter allows sorting the stocks within the theme. Currently, only price_change (daily percentage change) is supported.

curl --request GET \
  --url 'https://api.getlaplace.com/api/v1/custom-theme/672a58e165b9a4844a25260c?locale=en&sortBy=price_change' \
  --header 'Authorization: Bearer your-api-key'

Parameters

NameDescriptionExampleParameter TypeData Type
id
Unique identifier
672a58e165b9a4844a25260cpathstring
locale
Locale code
querystring
sortBy
Sort the stocks in a collection by a specific field. Currently only supports `price_change`. (Optional)
querystring

Response

(Note: Actual response can be different length and other fields may be present)

▼"root" : { 14 items … }
"id" : string"672a58e165b9a4844a25260c"
"image" : string"https://finfree-storage.s3.eu-central-1.amazonaws.com/themes/us/video_oyunlari.png"
"order" : int0
"title" : string"Test Metadata16"
"locale" : string"en"
▼"region" : [ 1 items … ]
0 : string"us"
]
"status" : string"inactive"
▼"stocks" : [ 2 items … ]
▼0 : { 9 items … }
"id" : string"6203d1ba1e67487527555619"
"name" : string"Advanced Micro Devices Inc."
"active" : booltrue
"symbol" : string"AMD"
"sectorId" : string"65533e047844ee7afe9941bf"
"assetType" : string"stock"
"industryId" : string"65533e441fa5c7b58afa0975"
"dailyChange" : float0.0570725320764599
"updatedDate" : string"2022-02-09T14:37:46.368Z"
}
▼1 : { 9 items … }
"id" : string"6203d1ba1e67487527555c66"
"name" : string"NVIDIA Corp"
"active" : booltrue
"symbol" : string"NVDA"
"sectorId" : string"65533e047844ee7afe9941bf"
"assetType" : string"stock"
"industryId" : string"65533e441fa5c7b58afa0975"
"dailyChange" : float0.0199333518467092
"updatedDate" : string"2022-02-09T14:37:46.37Z"
}
]
"imageUrl" : string"https://finfree-storage.s3.eu-central-1.amazonaws.com/collection-images/videogames-stocks_original.webp"
▼"metaData" : { 1 items … }
"test" : boolfalse
}
"avatarUrl" : string""
"numStocks" : int7
"assetClass" : string"equity"
"description" : string"This is test 15 for metadata."
}

Create New Custom Theme

Creates a new custom theme for the authenticated user using the provided data.

The request body must include localized title, a list of stocks, and optional metadata such as description, images, display order, status, and meta_data.

curl --request POST \
  --url https://api.getlaplace.com/api/v1/custom-theme \
  --header 'Authorization: Bearer your-api-key' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": {
    "en": "Rising Stocks",
    "tr": "Yükselen Hisseler"
  },
  "description": {
    "en": "Recently rising stocks.",
    "tr": "Son zamanlarda yükselen hisseler."
  },
  "stocks": [
    "61dd0d4b0ec2114146342f69",
    "61dd0d820ec211414634303e"
  ],
  "image_url": "https://finfree-storage.s3.eu-central-1.amazonaws.com/collection-images/ihracat-sampiyonlari_original.webp",
  "avatar_url": "https://finfree-storage.s3.eu-central-1.amazonaws.com/collection-images/ihracat-sampiyonlari_avatar.webp",
  "order": "3",
  "status": "active",
  "meta_data": {
    "color": "#FF0000"
  }
}'

Parameters

NameDescriptionExampleParameter TypeData Type
title
Localized title for a custom theme.
{"en":"Rising Stocks","tr":"Yükselen Hisseler"}bodyobject
description
Localized description for a custom theme. (Optional)
{"en":"Recently rising stocks.","tr":"Son zamanlarda yükselen hisseler."}bodyobject
stocks
List of stock IDs as string
61dd0d4b0ec2114146342f69, 61dd0d820ec211414634303ebodyarray
image_url
Default resolution image (Optional)
https://finfree-storage.s3.eu-central-1.amazonaws.com/collection-images/ihracat-sampiyonlari_original.webpbodystring
avatar_url
Lowest resolution image (Optional)
https://finfree-storage.s3.eu-central-1.amazonaws.com/collection-images/ihracat-sampiyonlari_avatar.webpbodystring
order
Order of this custom theme (Optional)
3bodynumber
status
Status of the theme
bodystring
meta_data
Additional optional data (Optional)
{"color":"#FF0000"}bodyobject

Response

(Note: Actual response can be different length and other fields may be present)

▼"root" : { 1 items … }
"id" : string"660c339fd7924abc17507c20"
}

Delete Custom Theme

Delete a custom theme you have previously created.

curl --request DELETE \
  --url https://api.getlaplace.com/api/v1/custom-theme/6256b0647d0bb100123effa7 \
  --header 'Authorization: Bearer your-api-key'

Parameters

NameDescriptionExampleParameter TypeData Type
id
Unique identifier
6256b0647d0bb100123effa7pathstring

© 2024 Laplace API. All rights reserved.