Git Product home page Git Product logo

Comments (6)

devbazregari avatar devbazregari commented on September 1, 2024

hi buddy. i hope you're doing great. I want to give this issue a try if you let me.

from okama.

Giac3 avatar Giac3 commented on September 1, 2024

Hey chilango, from what I've found the issue is not with the ticker having a dot but that specific suffix isn't actually correct for this asset. The ok.asset() works for SPY.US and in this case i'm assuming by BRK.A you mean the Berkshire Hathaway Inc Class A. Which for this asset the ticker is BRK-A.US and this does indeed work with the ok.asset() function. Seeing as a lot of assets are spelled differently online it could be helpful to return a check on the database to see what the user meant by his input as some assets will have dots where dashes should be and vice versa.

from okama.

chilango74 avatar chilango74 commented on September 1, 2024

Hey chilango, from what I've found the issue is not with the ticker having a dot but that specific suffix isn't actually correct for this asset. The ok.asset() works for SPY.US and in this case i'm assuming by BRK.A you mean the Berkshire Hathaway Inc Class A. Which for this asset the ticker is BRK-A.US and this does indeed work with the ok.asset() function. Seeing as a lot of assets are spelled differently online it could be helpful to return a check on the database to see what the user meant by his input as some assets will have dots where dashes should be and vice versa.

Actually my example was not correct. One should request BRK.A.US:
image
But the bug still remains.

from okama.

chilango74 avatar chilango74 commented on September 1, 2024

hi buddy. i hope you're doing great. I want to give this issue a try if you let me.

Sure. It should not be defficult. The problem is how namespace defined:

namespace = self._symbol.split(".", 1)[-1]

from okama.

devbazregari avatar devbazregari commented on September 1, 2024

@chilango74 bro, I'm not quite sure about what you want. do you want this "BRK.A" to be acceptable? in another word when we enter " BRK.A " this must be "BRK.A" not anything else. it's right?

from okama.

chilango74 avatar chilango74 commented on September 1, 2024

@chilango74 bro, I'm not quite sure about what you want. do you want this "BRK.A" to be acceptable? in another word when we enter " BRK.A " this must be "BRK.A" not anything else. it's right?

Our database uses namespaces to identify stock markets. To get the information about US ticker BRK.A one must use it with US namespace. The complete symbol is BRK.A.US (BRK.A is a ticker, US - namespace). Now the package does not correctly identify the namespace if the symbol has more than one dot in request.

The correct definition of Namespace - the combination of symbols after the LAST dot.

from okama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.