All URIs are relative to https://api.paxos.com/v2
Method | HTTP request | Description |
---|---|---|
GetOrderBook | Get /markets/{market}/order-book | Get Order Book |
GetTicker | Get /markets/{market}/ticker | Get Ticker |
ListMarkets | Get /markets | List Markets |
ListRecentExecutions | Get /markets/{market}/recent-executions | List Recent Executions |
GetOrderBookResponse GetOrderBook(ctx, market).Execute()
Get Order Book
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/avianlabs/paxos-go"
)
func main() {
market := "market_example" // string | Market of Order Book.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MarketDataAPI.GetOrderBook(context.Background(), market).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MarketDataAPI.GetOrderBook``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOrderBook`: GetOrderBookResponse
fmt.Fprintf(os.Stdout, "Response from `MarketDataAPI.GetOrderBook`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
market | string | Market of Order Book. |
Other parameters are passed through a pointer to a apiGetOrderBookRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TickerRecord GetTicker(ctx, market).Execute()
Get Ticker
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/avianlabs/paxos-go"
)
func main() {
market := "market_example" // string | Market of the Ticker.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MarketDataAPI.GetTicker(context.Background(), market).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MarketDataAPI.GetTicker``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTicker`: TickerRecord
fmt.Fprintf(os.Stdout, "Response from `MarketDataAPI.GetTicker`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
market | string | Market of the Ticker. |
Other parameters are passed through a pointer to a apiGetTickerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListMarketsResponse ListMarkets(ctx).Execute()
List Markets
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/avianlabs/paxos-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MarketDataAPI.ListMarkets(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MarketDataAPI.ListMarkets``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListMarkets`: ListMarketsResponse
fmt.Fprintf(os.Stdout, "Response from `MarketDataAPI.ListMarkets`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListMarketsRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListRecentExecutionsResponse ListRecentExecutions(ctx, market).Execute()
List Recent Executions
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/avianlabs/paxos-go"
)
func main() {
market := "market_example" // string | Market of the executions.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MarketDataAPI.ListRecentExecutions(context.Background(), market).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MarketDataAPI.ListRecentExecutions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListRecentExecutions`: ListRecentExecutionsResponse
fmt.Fprintf(os.Stdout, "Response from `MarketDataAPI.ListRecentExecutions`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
market | string | Market of the executions. |
Other parameters are passed through a pointer to a apiListRecentExecutionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]