MartinSeeler / rx-oanda

Reactive Oanda API wrapper for Scala based on akka-streams and akka-http.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add interest rate to instrument

MartinSeeler opened this issue · comments

An Instrument provided by Oanda has also informations about their interest rates, which can be useful for carry trades. The field is requested in the current request, but ignored by out case class.

The response from Oanda looks like this:

{
  "instrument": "ZAR_JPY",
  "displayName": "ZAR/JPY",
  "pip": "0.01",
  "precision": "0.001",
  "maxTradeUnits": 10000000,
  "maxTrailingStop": 10000,
  "minTrailingStop": 5,
  "marginRate": 0.02,
  "halted": true,
  "interestRate": {
    "ZAR": { // base currency
      "bid": 0.06,
      "ask": 0.0718
    },
    "JPY": { // quote currency
      "bid": -0.0015,
      "ask": 0.0025
    }
  }
}

ZAR in this case is the base currency, JPY the quote currency. I'm still not sure how the representation should look like.