{"repo":"alpacahq/alpaca-trade-api-go","free":true,"listed":false,"github":"https://github.com/alpacahq/alpaca-trade-api-go","clone":"git clone https://github.com/alpacahq/alpaca-trade-api-go.git","description":"Go client for Alpaca's trade API","language":"Go","stars":427,"topics":["hacktoberfest","trading","golang","go"],"license":"Apache-2.0","category":"trading","readme_excerpt":"alpaca-trade-api-go alpaca-trade-api-go is a Go library for the Alpaca trade and marketdata API. It allows rapid trading algo development easily, with support for the both REST and streaming interfaces. For details of each API behavior, please see the online API document. Installation Examples In order to call Alpaca's trade API, you need to obtain an API key pair from the web console. Trading REST example Trade updates stream example The following example shows how you can stream your own trade updates. First we register a handler function that simply prints the received trade updates, then we submit a single AAPL buy order. You should see two updates, a \"new\" event as soon as you submit the order, and a \"fill\" event soon after that, provided that the market is open. Further examples See the examples directory for further examples: - algo-trading examples - long-short - martingale - mean-reversion - marketdata examples - crypto-stream - data-stream - marketdata API Document The HTTP API document is located here. Authentication The Alpaca API requires API key ID and secret key, which you can obtain from the web console after you sign in. This key pair can then be applied to the SDK either by setting environment variables ( APCA API KEY ID= and APCA API SECRET KEY= ), or hardcoding them into the Go code directly as shown in the examples above. Broker auth You use your Broker API key and secret for authentication. However, for this to work make sure you're using the appropriate","default_branch":null,"files":null,"tree":[],"storefront":"/r/alpacahq","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/alpacahq/alpaca-trade-api-go/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}