Coder Social home page Coder Social logo

Example Code is not working about gryphon HOT 5 CLOSED

garethdmm avatar garethdmm commented on August 30, 2024
Example Code is not working

from gryphon.

Comments (5)

garethdmm avatar garethdmm commented on August 30, 2024

Hey @Vikhyat05, if I understand correctly, the screenshot you've shown is expected behaviour from ipython. That import that is failing is for a .pyx (cython) file, so you need to import the cython importer logic before it'll work. This is the code you need to run in order to import cython files:

import pyximport

pyximport.install()

Was there another issue you were seeing when you run that file from the strategy engine? The demo code might be slightly out of date, would be good to know.

from gryphon.

Vikhyat05 avatar Vikhyat05 commented on August 30, 2024

Thanks for your reply
Now when i tried to run on the command line there was and import error.

Also please let me know that to run this sample strategy is it necesary for me to provide the
API key , secerets and passphrase.

from gryphon.

Vikhyat05 avatar Vikhyat05 commented on August 30, 2024

Screenshot from 2019-07-02 15-46-05 (copy)

from gryphon.

garethdmm avatar garethdmm commented on August 30, 2024

Ok there are a couple things going on here.

First, gryphon-exec strategy takes a path to a strategy file from the current working directory, and the path that you're using looks like it's wrong. Your current working directory is 'strategies' and you create the strategy in that folder, but then run gryphon-exec strategy strategies/arb.py. This fails because that path isn't valid. In the way you have set it up the command should just be gryphon-exec strategy arb.py.

Second, the currently uploaded version of gryphon only supports strategy files with the .pyx suffix, not .py. There is a fix out for this in a branch right now but for now you should use arb.pyx not arb.py.

It looks like you're a couple steps away from being able to run this strategy, if you join the gryphon slack and join the #installation channel, I or someone else I'm sure would be happy to help you, and it would probably be faster than doing it through this issue.

from gryphon.

Vikhyat05 avatar Vikhyat05 commented on August 30, 2024

Thanks a lot, @garethdmm for help. Now the code is working fine. Yeah, I have joined the slack group too.
Now you can please close the issue.

from gryphon.

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.