0

我们要构建的用例是用户将看到一个金融机构列表,当他选择其中任何一个时,他需要提供凭据以对所选机构进行身份验证。然后将显示经纪账户,点击它会导致获取所有投资组合头寸。

到目前为止,我们已经取得了:

  1. 获取所有机构的列表,我们可以使用

API 方法:getInstitutions

  1. 选择一个机构并进行身份验证(我不确定这是正确的做法,如果有其他方法,请告诉我)

API 方法:discoverAndAddAccounts

  1. 获取与其关联的所有账户并使用 Brokerage 账户 id 获取所有头寸:

API 方法:getInvestmentPositions

使用上述将返回所有头寸,但我们无法区分头寸的“买入”和“卖出”动作。

注意:我们将这个 gem 用于相同的目的:https ://github.com/cloocher/aggcat

提前致谢。

4

1 回答 1

0

First you have to know the definition of an option:

DEFINITION of 'Option'

A financial derivative that represents a contract sold by one party (option writer) to another party (option holder). The contract offers the buyer the right, but not the obligation, to buy (call) or sell (put) a security or other financial asset at an agreed-upon price (the strike price) during a certain period of time or on a specific date (exercise date).

Then by looking at the Intuit documenation we can see that:

positionType string

This is used to explain how long a position is held and differentiate between writers and holders of an option or other security.

E.g. SHORT = Writer for options, Short - Write for all other securities, LONG = Holder for options, Long = Holder for all other securities. For Bonds, it is always "LONG".

于 2015-12-04T07:02:19.070 回答