Wiki

Clone wiki

hleofxquotes / Symbol_mapping

Symbol mapping

Use case

  • Your mny file has an investment with symbol AAPL
  • The quote source (FT) has a slightly different symbol name AAPL:NSQ for the same security.

Most common case

  • Search FT for price using symbol AAPL:NSQ
  • BUT when writing the generated OFX file to be imported into your mny file, use AAPL.

You can use this syntax

mny_symbol/quote_source_symbol
For example

AAPL/AAPL:NSQ

Full syntax

mny_symbol/quote_source_symbol/quote_source_currency/mny_currency
String mny_symbol quote_source_symbol quote_source_currency mny_currency
AAPL AAPL AAPL
AAPL/AAPL:NSQ AAPL AAPL:NSQ
AAPL/USD/GBP AAPL AAPL USD GBP
AAPL/AAPL:NSQ/USD/GBP AAPL AAPL:NSQ USD GBP

Example using currency conversion

  • mny symbol: TM
  • quote source symbol: 7203:TYO
  • quote source currency: JPN
  • mny currency: USD

You would use the following string's

TM/7203:TYO
JPYUSD=X
  • TM/7203:TYO: ask quote source using symbol 7203:TYO, then write the OFX using symbol TM
  • JPYUSD=X: also query for currency exchange rate so that we can write the price using currency USD

  • Let's say 7203:TYO returns 1817.5 JPY

  • and JPYUSD=X returns 0.0075 USD
  • the converted price from JPY to USD is: 1817.5 * 0.0075 = 13.63125 USD

we will then write the OFX as

        <INVPOSLIST>
          <POSSTOCK>
            <!--DTPRICEASOF local time is Mon Dec 26 22:00:00 PST 2022-->
            <INVPOS>
              <!--Ticker from quote source is: TM-->
              <SECID>
                <UNIQUEID>TM</UNIQUEID>
                <UNIQUEIDTYPE>TICKER</UNIQUEIDTYPE>
              </SECID>
              <HELDINACCT>OTHER</HELDINACCT>
              <POSTYPE>LONG</POSTYPE>
              <UNITS>0.000</UNITS>
              <UNITPRICE>13.63125</UNITPRICE>
              <MKTVAL>0.00</MKTVAL>
              <DTPRICEASOF>20221226220000.000[-8:PST]</DTPRICEASOF>
              <!--Price currency is same as default currency-->
              <CURRENCY>
                <CURRATE>1.00</CURRATE>
                <CURSYM>USD</CURSYM>
              </CURRENCY>

Updated