Giter VIP home page Giter VIP logo

Comments (11)

ajmwagar avatar ajmwagar commented on May 18, 2024 1

This looks great.

I need to clean up my branches and merge this into my fork. Then I can play it.

from apca.

d-e-s-o avatar d-e-s-o commented on May 18, 2024

Yeah, it's something that is on my TODO list, because I need it too, although not urgently. I looked at it briefly a while back and something about their design put me off. Will take another look.

from apca.

ajmwagar avatar ajmwagar commented on May 18, 2024

from apca.

d-e-s-o avatar d-e-s-o commented on May 18, 2024

Yep, sucks that they don't expose that properly, but perhaps it's for the better. I am importing all transactions into ledger and then have a script that spits out profit/loss per transaction or per-day. It works flawlessly, I have to say (and I wouldn't want to do it on the fly). But as you said it requires me to import fairly regularly because of the 100 item limit (has never been an issue so far, though).

from apca.

ajmwagar avatar ajmwagar commented on May 18, 2024

That's cool. I took a look at apcaledge. I'm still not sure how you're specifying the trade window.

My system is a lot of intraday trading. So I easily bust through 100 trades in a given day.

I'm also attempting to load the entire ledger at the start of my application, which requires pagination.

from apca.

d-e-s-o avatar d-e-s-o commented on May 18, 2024

It won't work in that case. I am relying on any trades not present in the ledger to be within the last 100 ones for the account. I don't do excessive amounts of trading yet, so that's why it has worked out so far. But it's also why I want this hooked up, too, because it will be a limitation eventually. In any case, I am working on getting page_size and page_token hooked up right now.

from apca.

ajmwagar avatar ajmwagar commented on May 18, 2024

Awesome! I appreciate it.

It's annoying because partial_fill is kinda useless for the ledger P/L from what I can tell.

I'm probably just going to store the ledger as a hash map of order Id and orders. Then sort by the timestamp when it's time to calculate P/L.

from apca.

d-e-s-o avatar d-e-s-o commented on May 18, 2024

Partial fills shouldn't matter at all for the ledger, should they? The knowledge of how much you ordered is not present there.

Here is what seems to be a working version: https://github.com/d-e-s-o/apca/tree/topic/paging

Feel free to give it a spin. Will hopefully polish and merge it by the weekend. Not sure if I'll cut a new release immediately, though.

from apca.

ajmwagar avatar ajmwagar commented on May 18, 2024

Your branch works great!

from apca.

d-e-s-o avatar d-e-s-o commented on May 18, 2024

Awesome. Thanks for trying it out.

from apca.

d-e-s-o avatar d-e-s-o commented on May 18, 2024

Change got merged into master now.

from apca.

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.