All URIs are relative to https://sandbox.finapi.io
Method | HTTP request | Description |
---|---|---|
GetAndSearchAllSecurities | Get /api/v1/securities | Get and search all securities |
GetMultipleSecurities | Get /api/v1/securities/{ids} | Get multiple securities |
GetSecurity | Get /api/v1/securities/{id} | Get a security |
PageableSecurityList GetAndSearchAllSecurities(ctx).Ids(ids).Search(search).AccountIds(accountIds).Page(page).PerPage(perPage).Order(order).XRequestId(xRequestId).Execute()
Get and search all securities
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ids := []int64{int64(123)} // []int64 | A comma-separated list of security identifiers. If specified, then only securities whose identifier match any of the given identifiers will be regarded. The maximum number of identifiers is 1000. (optional)
search := "search_example" // string | If specified, then only those securities will be contained in the result whose 'name', 'isin' or 'wkn' contains the given search string (the matching works case-insensitive). If no securities contain the search string in any of these fields, then the result will be an empty list. NOTE: If the given search string consists of several terms (separated by whitespace), then ALL of these terms must be contained in the searched fields for a security to get included into the result. (optional)
accountIds := []int64{int64(123)} // []int64 | Comma-separated list of identifiers of accounts (optional)
page := int32(56) // int32 | Result page that you want to retrieve. (optional) (default to 1)
perPage := int32(56) // int32 | Maximum number of records per page. By default it's 20. Can be at most 500. (optional) (default to 20)
order := []string{"Inner_example"} // []string | Determines the order of the results. You can order the results by next fields: 'id', 'name', 'isin', 'wkn', 'quote', 'quantityNominal', 'marketValue' and 'entryQuote'. The default order for all services is 'id,asc'. You can also order by multiple properties. In that case the order of the parameters passed is important. The general format is: 'property[,asc|desc]', with 'asc' being the default value. (optional)
xRequestId := "xRequestId_example" // string | With any API call, you can pass a request ID. The request ID can be an arbitrary string with up to 255 characters. Passing a longer string will result in an error. If you don't pass a request ID for a call, finAPI will generate a random ID internally. The request ID is always returned back in the response of a service, as a header with name 'X-Request-Id'. We highly recommend to always pass a (preferably unique) request ID, and include it into your client application logs whenever you make a request or receive a response (especially in the case of an error response). finAPI is also logging request IDs on its end. Having a request ID can help the finAPI support team to work more efficiently and solve tickets faster. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.SecuritiesApi.GetAndSearchAllSecurities(context.Background()).Ids(ids).Search(search).AccountIds(accountIds).Page(page).PerPage(perPage).Order(order).XRequestId(xRequestId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecuritiesApi.GetAndSearchAllSecurities``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAndSearchAllSecurities`: PageableSecurityList
fmt.Fprintf(os.Stdout, "Response from `SecuritiesApi.GetAndSearchAllSecurities`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetAndSearchAllSecuritiesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
ids | []int64 | A comma-separated list of security identifiers. If specified, then only securities whose identifier match any of the given identifiers will be regarded. The maximum number of identifiers is 1000. | |
search | string | If specified, then only those securities will be contained in the result whose 'name', 'isin' or 'wkn' contains the given search string (the matching works case-insensitive). If no securities contain the search string in any of these fields, then the result will be an empty list. NOTE: If the given search string consists of several terms (separated by whitespace), then ALL of these terms must be contained in the searched fields for a security to get included into the result. | |
accountIds | []int64 | Comma-separated list of identifiers of accounts | |
page | int32 | Result page that you want to retrieve. | [default to 1] |
perPage | int32 | Maximum number of records per page. By default it's 20. Can be at most 500. | [default to 20] |
order | []string | Determines the order of the results. You can order the results by next fields: 'id', 'name', 'isin', 'wkn', 'quote', 'quantityNominal', 'marketValue' and 'entryQuote'. The default order for all services is 'id,asc'. You can also order by multiple properties. In that case the order of the parameters passed is important. The general format is: 'property[,asc | desc]', with 'asc' being the default value. |
xRequestId | string | With any API call, you can pass a request ID. The request ID can be an arbitrary string with up to 255 characters. Passing a longer string will result in an error. If you don't pass a request ID for a call, finAPI will generate a random ID internally. The request ID is always returned back in the response of a service, as a header with name 'X-Request-Id'. We highly recommend to always pass a (preferably unique) request ID, and include it into your client application logs whenever you make a request or receive a response (especially in the case of an error response). finAPI is also logging request IDs on its end. Having a request ID can help the finAPI support team to work more efficiently and solve tickets faster. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SecurityList GetMultipleSecurities(ctx, ids).XRequestId(xRequestId).Execute()
Get multiple securities
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
ids := []int64{int64(123)} // []int64 | Comma-separated list of identifiers of requested securities
xRequestId := "xRequestId_example" // string | With any API call, you can pass a request ID. The request ID can be an arbitrary string with up to 255 characters. Passing a longer string will result in an error. If you don't pass a request ID for a call, finAPI will generate a random ID internally. The request ID is always returned back in the response of a service, as a header with name 'X-Request-Id'. We highly recommend to always pass a (preferably unique) request ID, and include it into your client application logs whenever you make a request or receive a response (especially in the case of an error response). finAPI is also logging request IDs on its end. Having a request ID can help the finAPI support team to work more efficiently and solve tickets faster. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.SecuritiesApi.GetMultipleSecurities(context.Background(), ids).XRequestId(xRequestId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecuritiesApi.GetMultipleSecurities``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMultipleSecurities`: SecurityList
fmt.Fprintf(os.Stdout, "Response from `SecuritiesApi.GetMultipleSecurities`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
ids | []int64 | Comma-separated list of identifiers of requested securities |
Other parameters are passed through a pointer to a apiGetMultipleSecuritiesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xRequestId | string | With any API call, you can pass a request ID. The request ID can be an arbitrary string with up to 255 characters. Passing a longer string will result in an error. If you don't pass a request ID for a call, finAPI will generate a random ID internally. The request ID is always returned back in the response of a service, as a header with name 'X-Request-Id'. We highly recommend to always pass a (preferably unique) request ID, and include it into your client application logs whenever you make a request or receive a response (especially in the case of an error response). finAPI is also logging request IDs on its end. Having a request ID can help the finAPI support team to work more efficiently and solve tickets faster. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Security GetSecurity(ctx, id).XRequestId(xRequestId).Execute()
Get a security
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := int64(789) // int64 | Security identifier
xRequestId := "xRequestId_example" // string | With any API call, you can pass a request ID. The request ID can be an arbitrary string with up to 255 characters. Passing a longer string will result in an error. If you don't pass a request ID for a call, finAPI will generate a random ID internally. The request ID is always returned back in the response of a service, as a header with name 'X-Request-Id'. We highly recommend to always pass a (preferably unique) request ID, and include it into your client application logs whenever you make a request or receive a response (especially in the case of an error response). finAPI is also logging request IDs on its end. Having a request ID can help the finAPI support team to work more efficiently and solve tickets faster. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.SecuritiesApi.GetSecurity(context.Background(), id).XRequestId(xRequestId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SecuritiesApi.GetSecurity``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSecurity`: Security
fmt.Fprintf(os.Stdout, "Response from `SecuritiesApi.GetSecurity`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int64 | Security identifier |
Other parameters are passed through a pointer to a apiGetSecurityRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xRequestId | string | With any API call, you can pass a request ID. The request ID can be an arbitrary string with up to 255 characters. Passing a longer string will result in an error. If you don't pass a request ID for a call, finAPI will generate a random ID internally. The request ID is always returned back in the response of a service, as a header with name 'X-Request-Id'. We highly recommend to always pass a (preferably unique) request ID, and include it into your client application logs whenever you make a request or receive a response (especially in the case of an error response). finAPI is also logging request IDs on its end. Having a request ID can help the finAPI support team to work more efficiently and solve tickets faster. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]