Quick Shortcuts
Introduction
In this article, we will delve into the intricacies of migrating from our API v1 to our enhanced API v2. We understand the challenges that may arise during this transition, and we aim to provide you with a clear roadmap to navigate the migration process seamlessly.
With API v2, we have introduced notable updates, including new endpoints, modified key structures, and updated values. This guide will equip you with the necessary knowledge and examples to effortlessly adapt to the changes, ensuring a smooth transition for your applications and services.
Understanding the Changes
To begin, we will outline the key differences between API v1 and API v2.
By highlighting the modified endpoints, updated keys, and transformed values, we aim to empower you to make the necessary mapping changes required to interface with our new API.
A Step-by-Step Migration Process
We understand the importance of a systematic approach to migration. Therefore, we will walk you through a comprehensive, step-by-step process to ensure a successful migration from API v1 to API v2. Each step will be accompanied by detailed examples, enabling you to grasp the nuances of the migration process.
Review the Endpoint Changes : We will provide you with a detailed overview of the modified endpoints in API v2. By understanding these changes, you can update your existing API calls accordingly.
Mapping Changes for Keys and Values : We will compare the key structures of API v1 and API v2, highlighting any modifications. This section will guide you through the necessary adjustments needed for a successful transition.
Testing and Fine-Tuning : Once you have made the necessary adjustments, we will guide you through the testing and fine-tuning phase. This will ensure that your newly migrated applications are functioning smoothly and without any issues.
Root Endpoint Changes
- https://api.wealthtechs.com/v1/
+ https://api.wealthtechs.com/v2/odata/
Resources Changes
🔀 Accounts
API Version Root Endpoint URL API v1.0 https://api.wealthtechs.com/v1/Accounts API v2.0 https://api.wealthtechs.com/v2/odata/Accounts
Key Changes API v1.0 Key API v2.0 Key No Changes custodianId CustodianId No Changes accountStatus AccountStatus No Changes primaryContact PrimaryContact No Changes dateOpened DateOpened Renamed mstrAcct Master Renamed accountID Number Renamed accountTitleLine1 Name Renamed acctType AccountType Renamed mailingAddressLine1 MailingAddress Renamed accountMailingCity MailingCity Renamed acctMailZip MailingZipCode Renamed acctMailingCtryCode MailingCountry Renamed emailAddress Email Renamed phoneNBR Phone Renamed businessPh BusinessPhone Joined currency Currency.Alpha2Code Deleted masterAccountName Deleted businessDate Deleted accountTitleLine2 Deleted accountTitleLine3 Deleted acctRegis Deleted txpryrTitle Deleted taxpayerFirstName Deleted taxpayerMiddleName Deleted taxpayerLastName Deleted aliasName Deleted mailingAddressLine2 Deleted mailingAddressLine3 Deleted managedAccountMoneyManager Deleted managedAccountInvestmentStrategy Deleted corporateTaxStatus Deleted acst
Accessing Updated & Removed Keys with OData Protocol
' https://api.wealthtechs.com/v2/odata/Accounts?&$expand=Currency($select=Alpha2Code)&$select=custodianID,Master,Number,Name,accountStatus,accountType,primaryContact,mailingAddress,MailingCity,MailingZipCode,MailingCountry,Email,phone,bussinesPhone,dateOpened '
🔀 Custodians
API Version Root Endpoint URL API v1.0 https://api.wealthtechs.com/v1/Custodians API v2.0 https://api.wealthtechs.com/v2/odata/Custodians
Key Changes API v1.0 Key API v2.0 Key No Changes id Id No Changes name Name Deleted status Deleted accountActiveCount Deleted accountMissingCount Deleted accountClosedCount Deleted amount Deleted deliveryMethod Deleted deliverySubMethod
🔀 FxRates
API Version Root Endpoint URL API v1.0 https://api.wealthtechs.com/v1/FxRates API v2.0 https://api.wealthtechs.com/v2/odata/FxRates
Key Changes API v1.0 Key API v2.0 Key Joined currency LocalCurrency.Alpha2Code Joined baseCurrency BaseCurrency.Alpha2Code Renamed price Factor
Accessing Updated & Removed Keys with OData Protocol
' https://api.wealthtechs.com/v2/odata/FxRates?&$expand=LocalCurrency($select=Alpha2Code)&$expand=BaseCurrency($select=Alpha2Code)&$select=Factor '
🔀 Positions
API Version Root Endpoint URL API v1.0 https://api.wealthtechs.com/v1/Positions API v2.0 https://api.wealthtechs.com/v2/odata/Positions
Key Changes API v1.0 Key API v2.0 Key No Changes origCotDate OrigCotDate No Changes quantity Quantity No Changes originalCost OriginalCost No Changes originalFace OriginalFace Joined portfolioCode Account.Number Joined symbol Security.PrimarySymbol Mapping type Security.SecurityType.Code + Security.Currency.Alpha2Code Renamed transactionCode ShortPosition Renamed tradeDate ProcessDate Renamed tradeAmount MarketValue Deleted comment Deleted settlementDate
Values Mapping
Field API v1.0 Value API v2.0 Value ShortPosition ‘SI’ TRUE ShortPosition ‘LI’ FALSE
Accessing Updated & Removed Keys with OData Protocol
' https://api.wealthtechs.com/v2/odata/Positions?$expand=Security($select=PrimarySymbol;$expand=SecurityType($select=Code)&$expand=Currency($select=Alpha2Code))&$expand=Account($select=Number)&$select=ShortPosition,ProcessDate,Quantity,MarketValue,OriginalCostDate,OriginalCost,OriginalFace '
🔀 Prices
API Version Root Endpoint URL API v1.0 https://api.wealthtechs.com/v1/Prices API v2.0 https://api.wealthtechs.com/v2/odata/Prices
Key Changes API v1.0 Key API v2.0 Key Joined symbol Security.PrimarySymbol Mapping type Security.SecurityType.Code + Security.Currency.Alpha2Code Renamed price PriceValue
Accessing Updated & Removed Keys with OData Protocol
' https://api.wealthtechs.com/v2/odata/Prices?$expand=Security($select=PrimarySymbol;$expand=SecurityType($select=Code)&$expand=Currency($select=Alpha2Code))&$select=PriceValue '
🔀 TaxLots
API Version Root Endpoint URL API v1.0 https://api.wealthtechs.com/v1/TaxLots API v2.0 https://api.wealthtechs.com/v2/odata/TaxLots
Key Changes API v1.0 Key API v2.0 Key No Changes tradeDate TradeDate No Changes quantity Quantity No Changes originalCost OriginalCost No Changes originalFace OriginalFace Joined portfolioCode Account.Number Joined symbol Security.PrimarySymbol Mapping type Security.SecurityType.Code + Security.Currency.Alpha2Code Renamed transactionCode ShortPosition Renamed origCostDate OriginalCostDate Renamed tradeAmount Amount Deleted comment
Values Mapping
Field API v1.0 Value API v2.0 Value ShortPosition ‘SI’ TRUE ShortPosition ‘LI’ FALSE
Accessing Updated & Removed Keys with OData Protocol
' https://api.wealthtechs.com/v2/odata/TaxLots?$expand=Security($select=PrimarySymbol;$expand=SecurityType($select=Code)&$expand=Currency($select=Alpha2Code))&$expand=Account($select=Number)&$select=ShortPosition,TradeDate,Quantity,Amount,OriginalCostDate,OriginalCost,OriginalFace '
🔀 Transactions
API Version Root Endpoint URL API v1.0 https://api.wealthtechs.com/v1/Positions API v2.0 https://api.wealthtechs.com/v2/odata/Transactions
Key Changes API v1.0 Key API v2.0 Key No Changes comment Comment No Changes tradeDate TradeDate No Changes settlementDate SettlementDate No Changes quantity Quantity No Changes originalCost OriginalCost No Changes exchangeFee ExchangeFee No Changes commission Commission No Changes broker Broker No Changes otherFees OtherFees No Changes whtType WhtType No Changes whtSymbol WhtSymbol No Changes execPri ExecPri No Changes execPriCalc ExecPriCalc Joined portfolioCode Account.Number Joined transactionCode TransactionCode.Code Joined symbol Security.PrimarySymbol Mapping type Security.SecurityType.Code + Security.Currency.Alpha2Code Renamed origCostDate OriginalCostDate Renamed srcDesType SdType Renamed srcDesSymbol SdSymbol Renamed tradeAmount Amount Deleted trDateFX Deleted setDateFX Deleted impComm Deleted commissionPurpose Deleted pledge Deleted lotLocation Deleted originalFace Deleted post Deleted perfCont
Values Mapping
Field API v1.0 Value API v2.0 Value Notes WhtType ‘WhtType’ ‘WhtSecurityId’ For WHT Transactions, you need to join with Securities to identify the type of the security related to the tax. WhtSymbol ‘Wht Symbol’ ‘WhtSecurityId’ For WHT Transactions, you need to join with Securities to identify the security related to the tax.
Accessing Updated & Removed Keys with OData Protocol
' https://api.wealthtechs.com/v2/odata/Transactions?$expand=Security($select=PrimarySymbol;$expand=SecurityType($select=Code)&$expand=Currency($select=Alpha2Code))&$expand=Account($select=Number)&$expand=TransactionCode($select=Code)&$select=Comment,TradeDate,SettlementDate,Quantity,Sdtype,Sdsymbol,Amount,ExchangeFee,Commission,Broker,OtherFees,OriginalCostDate,OriginalCost,ExecPri,ExecPriCalc '
🔀 Vehicles
API Version Root Endpoint URL API v1.0 https://api.wealthtechs.com/v1/Vehicles API v2.0 https://api.wealthtechs.com/v2/odata/Securities
Key Changes API v1.0 Key API v2.0 Key No Changes id Id No Changes primarySymbol PrimarySymbol No Changes cusip Cusip No Changes sedol Sedol No Changes isin Isin No Changes ticker Ticker Joined type SecurityType.Code Joined currency Currency.Alpha2Code Joined primaryType SecurityType.MajorAssetClass.PrimaryTypeCode Joined majorAassetClass SecurityType.MajorAssetClass.Name Renamed description1 Description Deleted cins Deleted description2 Deleted description3 Deleted description4 Deleted description5 Deleted dinorAssetClass Deleted minorAssetClass Deleted countryOfIssue Deleted tradeCurrency Deleted issueCurrency Deleted riskCurrency Deleted snpRating Deleted moodyRating Deleted exDividendDate Deleted recordDate Deleted dividendRate Deleted payableDate Deleted accrualCalendar Deleted maturityCurrency Deleted variableRate Deleted issueDate Deleted datedDate Deleted maturityDate Deleted annualRate Deleted yieldToMaturity Deleted incomeFrequency Deleted firstInterestPaymentDate Deleted callPut1 Deleted callPut1Date Deleted callPut1Price Deleted callPut2 Deleted callPut2Date Deleted callPut2Price Deleted callPut3 Deleted callPut3Date Deleted callPut3Price Deleted currentAmortizationFactorDate Deleted currentAmortizationFactor Deleted previousAmortizationFactorDate Deleted previousAmortizationFactor Deleted prePreviousAmortizationFactorDate Deleted prePreviousAmortizationFactor Deleted gnmapoolNumber Deleted unpricedIndicator Deleted optionExpirationDate Deleted optionStrikePrice Deleted optionCallPutIndicator Deleted securtiesClearingCorpCode Deleted finalPaymentDate Deleted secondInterestPaymentDate Deleted thirdInterestPaymentDate Deleted fourthInterestPaymentDate Deleted discountZeroCouponOid Deleted primaryExchange Deleted dtcCode Deleted fundFamily Deleted couponDelay Deleted bondType Deleted shareMultiplier Deleted nextDividendAmount Deleted federalTax Deleted bondFactor Deleted foreingCode Deleted worthlessCode Deleted marginCode Deleted factDate Deleted cusipUnderlyingSecurity Deleted refundType Deleted taxable Deleted originalIssueDiscount Deleted duration Deleted madatoryRedemptionDate Deleted prerefundingDate Deleted prerefundingPrice Deleted averageLife
Accessing Updated & Removed Keys with OData Protocol
' https://api.wealthtechs.com/v2/odata/Securities?$expand=SecurityType($select=Code)&$expand=Currency($select=Alpha2Code)&$expand=Sector($select=Name)&$select=Id,PrimarySymbol,Cusip,Sedol,Isin,Ticker,Description,Industry '