The Currency Codes (CurrencyCodes) Data Block is part of the Assette default stand up and is not normally edited by end users. If currency codes need to be changed, see Source List of Currency Codes instead.
The Currency Codes (CurrencyCodes) Data Block retrieves the values for all currency codes including the ID, Symbol, description, isDeleted, and short code from the Source List of Currency Codes Data Block— a Constant Data Block. The Currency Codes (CurrencyCodes) Data Block is not normally edited by end user, to update Currency Code, see Source List of Currency Codes Data Block instead.
General Info #
Field | Value |
---|---|
Name | CurrencyCode |
Block Category | Transform |
Block Type | Python |
Data Category | None |
Output Type | Data Table |
Dependencies #
None
Required Columns #
Name | Description | Data Type |
---|---|---|
ID | Universally unique id (UUID) | |
Symbol | ||
Currency | Currency short code (e.g., “USD”) | |
Description | ||
IsDeleted | ||
ShortCode | ||
BatchID |
Example Definition #
outputlist=[]
data_df = pd.DataFrame(read("Source_ListOfCurrencyCodes",{})["data"])
if data_df.shape[0]>0:
if "BatchID" not in data_df.columns:
data_df["BatchID"]=""
for i in range(0, data_df.shape[0]):
outputlist.append({ "ID": data_df.loc[i,"ID"],"Symbol": data_df.loc[i,"Symbol"],"Currency": data_df.loc[i,"Currency"],"Description": data_df.loc[i,"Description"],"IsDeleted": data_df.loc[i,"IsDeleted"],"ShortCode": data_df.loc[i,"ShortCode"]})
response["data"] = outputlist
Example Request #
{}
Example Response #
The following response has been truncated for brevity.
{
"data": [
{
"ID": "190",
"Symbol": "$ ",
"Currency": "AUD",
"Description": "Australian Dollar",
"IsDeleted": null,
"ShortCode": "au"
},
{
"ID": "209",
"Symbol": "$ ",
"Currency": "CAD",
"Description": "Canadian Dollar",
"IsDeleted": null,
"ShortCode": "ca"
},
{
"ID": "333",
"Symbol": "$ ",
"Currency": "USD",
"Description": "US Dollar",
"IsDeleted": null,
"ShortCode": "us"
}
],
"errors": [],
"success": true,
"logs": []
}