API reference · General and lookups
List currencies
Returns the active currencies with their ID, code and name.
https://out.stockmount.com/api/General/GetCurrencies
The list is the same for every account. There is no paging and the order is not guaranteed.
Only active currencies are returned. The internal "unknown" entry (CurrencyId 1) is not listed.
Use these values wherever a currency ID (CurrencyId) is expected. Some IDs defined as constants in code: 2 = US dollar, 3 = Euro, 4 = Turkish lira.
Only ApiCode is read from the request body.
Request fields
| Field | Type | Description |
|---|---|---|
ApiCode
required
|
string |
Session code returned by DoLogin.
|
Response fields (Response)
| Field | Type | Description |
|---|---|---|
CurrencyId
|
integer | Currency ID. |
Code
|
string | Currency code. |
Name
|
string | Currency name. |
Error codes for this endpoint
| Code | When |
|---|---|
99999 |
An unexpected server-side error occurred (e.g. a database error). On this endpoint ErrorMessage is usually empty. |
For session errors (00001, 00006) and every other code see error codes.
Related endpoints
Example request
{
"ApiCode": "API_CODE"
}
curl -X POST 'https://out.stockmount.com/api/General/GetCurrencies' \
-H 'Content-Type: application/json' \
-d '{
"ApiCode": "API_CODE"
}'
using System.Net.Http;
using System.Text;
using var http = new HttpClient();
var json = """
{
"ApiCode": "API_CODE"
}
""";
var response = await http.PostAsync(
"https://out.stockmount.com/api/General/GetCurrencies",
new StringContent(json, Encoding.UTF8, "application/json"));
var result = await response.Content.ReadAsStringAsync();
// Result == false ise ErrorCode ve ErrorMessage alanlarına bakın.
Console.WriteLine(result);
<?php
$body = <<<'JSON'
{
"ApiCode": "API_CODE"
}
JSON;
$ch = curl_init('https://out.stockmount.com/api/General/GetCurrencies');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
if (!$result['Result']) {
echo $result['ErrorCode'] . ' ' . $result['ErrorMessage'];
}
import requests
payload = {
"ApiCode": "API_CODE"
}
response = requests.post("https://out.stockmount.com/api/General/GetCurrencies", json=payload, timeout=60)
result = response.json()
if not result["Result"]:
print(result["ErrorCode"], result["ErrorMessage"])
const payload = {
"ApiCode": "API_CODE"
};
const response = await fetch("https://out.stockmount.com/api/General/GetCurrencies", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const result = await response.json();
if (!result.Result) {
console.error(result.ErrorCode, result.ErrorMessage);
}
Example response
{
"Result": true,
"Response": [
{
"CurrencyId": 2,
"Code": "USD",
"Name": "Amerikan Doları"
},
{
"CurrencyId": 3,
"Code": "EUR",
"Name": "Euro"
},
{
"CurrencyId": 4,
"Code": "TRY",
"Name": "Türk Lirası"
}
]
}
Try it
The request goes straight from your browser to out.stockmount.com. The ApiCode is not stored by this site; it is kept only while this tab is open.
Get an ApiCode before sending requests.
Recent requests
Requests sent from this tab; click one to load its body again.