コード例 #1
0
ファイル: oanda_test.go プロジェクト: peter1000/oanda
func CloseAllPositions(c *check.C, client *oanda.Client) {
	positions, err := client.Positions()
	c.Assert(err, check.IsNil)

	for _, pos := range positions {
		_, err = client.ClosePosition(pos.Instrument)
		c.Assert(err, check.IsNil)
	}
}