Skip to content

Commit 04b6bba

Browse files
committed
Check in go library
1 parent 8ebacc0 commit 04b6bba

File tree

71 files changed

+4403
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+4403
-1
lines changed

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.PHONY: all
2-
all: libraries/python/urllib3 libraries/python/asyncio
2+
all: libraries/python/urllib3 libraries/python/asyncio libraries/go
33

44
SPECS := $(wildcard specs/*)
55
libraries/python/urllib3: $(SPECS) Makefile
@@ -9,3 +9,7 @@ libraries/python/urllib3: $(SPECS) Makefile
99
libraries/python/asyncio: $(SPECS) Makefile
1010
rm -rf libraries/python/asyncio
1111
openapi-generator generate -i ./specs/tradier.yaml -g python --additional-properties projectName=tradier_asyncio,library=asyncio --library asyncio -o libraries/python/asyncio --package-name tradier_asyncio
12+
13+
libraries/go: $(SPECS) Makefile
14+
rm -rf libraries/go
15+
openapi-generator generate -i ./specs/tradier.yaml -g go --package-name tradier -o libraries/go --additional-properties projectName=tradier --git-user-id sargun --git-repo-id tradier

libraries/go/.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2+
*.o
3+
*.a
4+
*.so
5+
6+
# Folders
7+
_obj
8+
_test
9+
10+
# Architecture specific extensions/prefixes
11+
*.[568vq]
12+
[568vq].out
13+
14+
*.cgo1.go
15+
*.cgo2.c
16+
_cgo_defun.c
17+
_cgo_gotypes.go
18+
_cgo_export.*
19+
20+
_testmain.go
21+
22+
*.exe
23+
*.test
24+
*.prof
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.3.1

libraries/go/.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: go
2+
3+
install:
4+
- go get -d -v .
5+
6+
script:
7+
- go build -v ./
8+

libraries/go/README.md

+101
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Go API client for tradier
2+
3+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4+
5+
## Overview
6+
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
7+
8+
- API version: v1
9+
- Package version: 1.0.0
10+
- Build package: org.openapitools.codegen.languages.GoClientCodegen
11+
12+
## Installation
13+
14+
Install the following dependencies:
15+
16+
```shell
17+
go get github.com/stretchr/testify/assert
18+
go get golang.org/x/oauth2
19+
go get golang.org/x/net/context
20+
go get github.com/antihax/optional
21+
```
22+
23+
Put the package under your project folder and add the following in import:
24+
25+
```golang
26+
import "./tradier"
27+
```
28+
29+
## Documentation for API Endpoints
30+
31+
All URIs are relative to *https://sandbox.tradier.com/v1*
32+
33+
Class | Method | HTTP request | Description
34+
------------ | ------------- | ------------- | -------------
35+
*DefaultApi* | [**MarketsEventsSessionPost**](docs/DefaultApi.md#marketseventssessionpost) | **Post** /markets/events/session |
36+
*DefaultApi* | [**MarketsHistoryGet**](docs/DefaultApi.md#marketshistoryget) | **Get** /markets/history |
37+
*DefaultApi* | [**MarketsOptionsChainsGet**](docs/DefaultApi.md#marketsoptionschainsget) | **Get** /markets/options/chains |
38+
*DefaultApi* | [**MarketsOptionsExpirationsGet**](docs/DefaultApi.md#marketsoptionsexpirationsget) | **Get** /markets/options/expirations |
39+
*DefaultApi* | [**MarketsOptionsLookupGet**](docs/DefaultApi.md#marketsoptionslookupget) | **Get** /markets/options/lookup |
40+
*DefaultApi* | [**MarketsOptionsStrikesGet**](docs/DefaultApi.md#marketsoptionsstrikesget) | **Get** /markets/options/strikes |
41+
*DefaultApi* | [**MarketsQuotesGet**](docs/DefaultApi.md#marketsquotesget) | **Get** /markets/quotes |
42+
*DefaultApi* | [**MarketsQuotesPost**](docs/DefaultApi.md#marketsquotespost) | **Post** /markets/quotes |
43+
*DefaultApi* | [**UserProfileGet**](docs/DefaultApi.md#userprofileget) | **Get** /user/profile |
44+
45+
46+
## Documentation For Models
47+
48+
- [InlineResponse2Xx](docs/InlineResponse2Xx.md)
49+
- [InlineResponse2Xx1](docs/InlineResponse2Xx1.md)
50+
- [InlineResponse2Xx1Expirations](docs/InlineResponse2Xx1Expirations.md)
51+
- [InlineResponse2Xx1ExpirationsExpiration](docs/InlineResponse2Xx1ExpirationsExpiration.md)
52+
- [InlineResponse2Xx1ExpirationsStrikes](docs/InlineResponse2Xx1ExpirationsStrikes.md)
53+
- [InlineResponse2Xx2](docs/InlineResponse2Xx2.md)
54+
- [InlineResponse2Xx2Strikes](docs/InlineResponse2Xx2Strikes.md)
55+
- [InlineResponse2Xx3](docs/InlineResponse2Xx3.md)
56+
- [InlineResponse2Xx3Symbols](docs/InlineResponse2Xx3Symbols.md)
57+
- [InlineResponse2Xx4](docs/InlineResponse2Xx4.md)
58+
- [InlineResponse2Xx4Stream](docs/InlineResponse2Xx4Stream.md)
59+
- [InlineResponse2Xx5](docs/InlineResponse2Xx5.md)
60+
- [InlineResponse2Xx5History](docs/InlineResponse2Xx5History.md)
61+
- [InlineResponse2Xx5HistoryDay](docs/InlineResponse2Xx5HistoryDay.md)
62+
- [InlineResponse2XxOptions](docs/InlineResponse2XxOptions.md)
63+
- [Option](docs/Option.md)
64+
- [OptionGreeks](docs/OptionGreeks.md)
65+
- [Profile](docs/Profile.md)
66+
- [ProfileProfile](docs/ProfileProfile.md)
67+
- [ProfileProfileAccount](docs/ProfileProfileAccount.md)
68+
- [Quote](docs/Quote.md)
69+
- [Quotes](docs/Quotes.md)
70+
- [QuotesQuotes](docs/QuotesQuotes.md)
71+
- [StreamingQuote](docs/StreamingQuote.md)
72+
- [StreamingSummary](docs/StreamingSummary.md)
73+
- [StreamingTimesale](docs/StreamingTimesale.md)
74+
- [StreamingTrade](docs/StreamingTrade.md)
75+
- [StreamingTradex](docs/StreamingTradex.md)
76+
77+
78+
## Documentation For Authorization
79+
80+
81+
82+
## BearerAuth
83+
84+
- **Type**: HTTP basic authentication
85+
86+
Example
87+
88+
```golang
89+
auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
90+
UserName: "username",
91+
Password: "password",
92+
})
93+
r, err := client.Service.Operation(auth, args)
94+
```
95+
96+
97+
98+
## Author
99+
100+
101+

0 commit comments

Comments
 (0)