【问题标题】:Plaid API investment holdings don't have unique identifier格子 API 投资控股没有唯一标识符
【发布时间】:2023-01-26 22:26:14
【问题描述】:

/investments/holdings/get 不返回唯一标识符。因此,似乎不可能在不擦除所有现有持有数据的情况下进行本地数据库更新。有什么我想念的吗?

来自 Plaid 的示例响应:

{
    "account_id": "5d37rd4BdJkq1zZkR8XEI9ovVAn35Ph464637",
    "cost_basis": null,
    "institution_price": 15.24,
    "institution_price_as_of": null,
    "institution_value": 30.48,
    "iso_currency_code": "USD",
    "quantity": 2,
    "security_id": "3mg4qV4JZyckeZnYfgazubEhn8gLKkUeMVpx4",
    "unofficial_currency_code": null
}

请注意,account_id + security_id 不是有效的复合键。 Plaid 返回持有的每个“手数”,因此同一证券和账户可以有多个持有,因为它们可能具有不同的成本基础。

如果 Plaid 正在监听,最好在响应中添加一个唯一的 holding_id,它肯定存储在 Plaid 的一端,类似于 transaction_iditem_idaccount_id

【问题讨论】:

  • 如果您希望 Plaid 能够“倾听”,那么或许可以直接与他们联系。
  • @SolarMike 已经有了!
  • @codeprose-sam 你从 Plaid 中发现了什么吗?也许您可以写下您的问题的答案。

标签: plaid


【解决方案1】:

不确定这是否是一个优雅的解决方案,但您是否考虑过使用“security_id”和“account_id”的组合?总之,我相信它们对于一个特定的持股来说是独一无二的……

【讨论】:

    猜你喜欢
    • 2013-05-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-19
    • 1970-01-01
    • 2011-10-02
    • 2011-08-25
    • 2013-02-19
    相关资源
    最近更新 更多