Trade confirmation data

Haven’t found it on our own yet but wondering if anyone knows how to pull the trade confirmation data from either the paper or live api from the transaction history other than logging it manually or using a json-like scrape off the dashboard.

look into

also for the v2 api


Body seems unclear, is it a complete sentence?

@trykrb are you looking for actual trade confirmation PDF files or are you trying to get trade executions as data?

Was looking for the current average position price as shown in the dashboard to build a dollar cost averaging buy/sell algo.
Probably a stupid question. May have found the answer in a sample off medium.

We are actually rolling out this new API endpoint to get all the order fills. Does this help?

1 Like

We saw this. Already wrote the code we needed for a test run. Seems to work well enough.

def dumpPosition(AlpacaClient):
rv = False
position = AlpacaClient.get_position(TARGET_SYMBOL)

    if position:
        if (float(position.current_price) - float(position.avg_entry_price)) >= MIN_P_AND_L:
            # Take the profit and run
            rv = True
            logAction('"sell", "{}", {}, {}'.format(TARGET_SYMBOL, position.qty, position.current_price))
except requests.exceptions.HTTPError as re:
except as ae:
return rv
1 Like