Skip to content

Commit 1729b89

Browse files
Generate code for metals in grams.
1 parent c86d5b9 commit 1729b89

File tree

3 files changed

+112
-0
lines changed

3 files changed

+112
-0
lines changed

dist/golang/instruments/resources.go

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,15 @@ const (
450450
// SilverTroyOunce -
451451
CurrenciesSilverTroyOunce = "XAG"
452452

453+
// SilverGram -
454+
CurrenciesSilverGram = "GAG"
455+
453456
// GoldTroyOunce -
454457
CurrenciesGoldTroyOunce = "XAU"
455458

459+
// GoldGram -
460+
CurrenciesGoldGram = "GAU"
461+
456462
// EastCaribbeanDollar -
457463
CurrenciesEastCaribbeanDollar = "XCD"
458464

@@ -465,12 +471,18 @@ const (
465471
// PalladiumTroyOunce -
466472
CurrenciesPalladiumTroyOunce = "XPD"
467473

474+
// PalladiumGram -
475+
CurrenciesPalladiumGram = "GPD"
476+
468477
// CFPFranc -
469478
CurrenciesCFPFranc = "XPF"
470479

471480
// PlatinumTroyOunce -
472481
CurrenciesPlatinumTroyOunce = "XPT"
473482

483+
// PlatinumGram -
484+
CurrenciesPlatinumGram = "GPT"
485+
474486
// YemeniRial -
475487
CurrenciesYemeniRial = "YER"
476488

@@ -1684,6 +1696,14 @@ func CurrenciesData(code string) *CurrenciesCode {
16841696
MetaData: `{"precision":4,"symbol":"Ag"}`,
16851697
}
16861698

1699+
case CurrenciesSilverGram:
1700+
return &CurrenciesCode{
1701+
Name: "SilverGram",
1702+
Label: "Silver gram",
1703+
Description: "",
1704+
MetaData: `{"precision":3,"symbol":"Ag"}`,
1705+
}
1706+
16871707
case CurrenciesGoldTroyOunce:
16881708
return &CurrenciesCode{
16891709
Name: "GoldTroyOunce",
@@ -1692,6 +1712,14 @@ func CurrenciesData(code string) *CurrenciesCode {
16921712
MetaData: `{"precision":4,"symbol":"Au"}`,
16931713
}
16941714

1715+
case CurrenciesGoldGram:
1716+
return &CurrenciesCode{
1717+
Name: "GoldGram",
1718+
Label: "Gold gram",
1719+
Description: "",
1720+
MetaData: `{"precision":3,"symbol":"Au"}`,
1721+
}
1722+
16951723
case CurrenciesEastCaribbeanDollar:
16961724
return &CurrenciesCode{
16971725
Name: "EastCaribbeanDollar",
@@ -1724,6 +1752,14 @@ func CurrenciesData(code string) *CurrenciesCode {
17241752
MetaData: `{"precision":4,"symbol":"Pd"}`,
17251753
}
17261754

1755+
case CurrenciesPalladiumGram:
1756+
return &CurrenciesCode{
1757+
Name: "PalladiumGram",
1758+
Label: "Palladium gram",
1759+
Description: "",
1760+
MetaData: `{"precision":3,"symbol":"Pd"}`,
1761+
}
1762+
17271763
case CurrenciesCFPFranc:
17281764
return &CurrenciesCode{
17291765
Name: "CFPFranc",
@@ -1740,6 +1776,14 @@ func CurrenciesData(code string) *CurrenciesCode {
17401776
MetaData: `{"precision":4,"symbol":"Pt"}`,
17411777
}
17421778

1779+
case CurrenciesPlatinumGram:
1780+
return &CurrenciesCode{
1781+
Name: "PlatinumGram",
1782+
Label: "Platinum gram",
1783+
Description: "",
1784+
MetaData: `{"precision":3,"symbol":"Pt"}`,
1785+
}
1786+
17431787
case CurrenciesYemeniRial:
17441788
return &CurrenciesCode{
17451789
Name: "YemeniRial",
@@ -2815,13 +2859,27 @@ func CurrenciesMap() map[string]*CurrenciesCode {
28152859
MetaData: `{"precision":4,"symbol":"Ag"}`,
28162860
},
28172861

2862+
CurrenciesSilverGram: &CurrenciesCode{
2863+
Name: "SilverGram",
2864+
Label: "Silver gram",
2865+
Description: "",
2866+
MetaData: `{"precision":3,"symbol":"Ag"}`,
2867+
},
2868+
28182869
CurrenciesGoldTroyOunce: &CurrenciesCode{
28192870
Name: "GoldTroyOunce",
28202871
Label: "Gold troy ounce",
28212872
Description: "",
28222873
MetaData: `{"precision":4,"symbol":"Au"}`,
28232874
},
28242875

2876+
CurrenciesGoldGram: &CurrenciesCode{
2877+
Name: "GoldGram",
2878+
Label: "Gold gram",
2879+
Description: "",
2880+
MetaData: `{"precision":3,"symbol":"Au"}`,
2881+
},
2882+
28252883
CurrenciesEastCaribbeanDollar: &CurrenciesCode{
28262884
Name: "EastCaribbeanDollar",
28272885
Label: "East Caribbean dollar",
@@ -2850,6 +2908,13 @@ func CurrenciesMap() map[string]*CurrenciesCode {
28502908
MetaData: `{"precision":4,"symbol":"Pd"}`,
28512909
},
28522910

2911+
CurrenciesPalladiumGram: &CurrenciesCode{
2912+
Name: "PalladiumGram",
2913+
Label: "Palladium gram",
2914+
Description: "",
2915+
MetaData: `{"precision":3,"symbol":"Pd"}`,
2916+
},
2917+
28532918
CurrenciesCFPFranc: &CurrenciesCode{
28542919
Name: "CFPFranc",
28552920
Label: "CFP franc",
@@ -2864,6 +2929,13 @@ func CurrenciesMap() map[string]*CurrenciesCode {
28642929
MetaData: `{"precision":4,"symbol":"Pt"}`,
28652930
},
28662931

2932+
CurrenciesPlatinumGram: &CurrenciesCode{
2933+
Name: "PlatinumGram",
2934+
Label: "Platinum gram",
2935+
Description: "",
2936+
MetaData: `{"precision":3,"symbol":"Pt"}`,
2937+
},
2938+
28672939
CurrenciesYemeniRial: &CurrenciesCode{
28682940
Name: "YemeniRial",
28692941
Label: "Yemeni rial",

dist/json/instruments.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3101,6 +3101,15 @@
31013101
},
31023102
"name": "SilverTroyOunce"
31033103
},
3104+
{
3105+
"code": "GAG",
3106+
"label": "Silver gram",
3107+
"metadata": {
3108+
"precision": 3,
3109+
"symbol": "Ag"
3110+
},
3111+
"name": "SilverGram"
3112+
},
31043113
{
31053114
"code": "XAU",
31063115
"label": "Gold troy ounce",
@@ -3110,6 +3119,15 @@
31103119
},
31113120
"name": "GoldTroyOunce"
31123121
},
3122+
{
3123+
"code": "GAU",
3124+
"label": "Gold gram",
3125+
"metadata": {
3126+
"precision": 3,
3127+
"symbol": "Au"
3128+
},
3129+
"name": "GoldGram"
3130+
},
31133131
{
31143132
"code": "XCD",
31153133
"label": "East Caribbean dollar",
@@ -3170,6 +3188,15 @@
31703188
},
31713189
"name": "PalladiumTroyOunce"
31723190
},
3191+
{
3192+
"code": "GPD",
3193+
"label": "Palladium gram",
3194+
"metadata": {
3195+
"precision": 3,
3196+
"symbol": "Pd"
3197+
},
3198+
"name": "PalladiumGram"
3199+
},
31733200
{
31743201
"code": "XPF",
31753202
"label": "CFP franc",
@@ -3196,6 +3223,15 @@
31963223
},
31973224
"name": "PlatinumTroyOunce"
31983225
},
3226+
{
3227+
"code": "GPT",
3228+
"label": "Platinum gram",
3229+
"metadata": {
3230+
"precision": 3,
3231+
"symbol": "Pt"
3232+
},
3233+
"name": "PlatinumGram"
3234+
},
31993235
{
32003236
"code": "YER",
32013237
"label": "Yemeni rial",

dist/markdown/protocol-resources.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,17 @@ International Organization for Standardization code for Currency. 3 character co
178178
- SamoanTala
179179
- CentralAfricanCFAFranc
180180
- SilverTroyOunce
181+
- SilverGram
181182
- GoldTroyOunce
183+
- GoldGram
182184
- EastCaribbeanDollar
183185
- IMFSpecialDrawingRights
184186
- WestAfricanCFAFranc
185187
- PalladiumTroyOunce
188+
- PalladiumGram
186189
- CFPFranc
187190
- PlatinumTroyOunce
191+
- PlatinumGram
188192
- YemeniRial
189193
- SouthAfricanRand
190194
- ZambianKwacha

0 commit comments

Comments
 (0)