28 lines
1.1 KiB
Go
28 lines
1.1 KiB
Go
package sdk
|
|
|
|
import "context"
|
|
|
|
func (c *Client) ExtData(ctx context.Context, extdataname, stockcode string, deviation int) (any, error) {
|
|
return c.postField(ctx, "/api/ext/ext_data", map[string]any{
|
|
"extdataname": extdataname, "stockcode": stockcode, "deviation": deviation,
|
|
}, "value")
|
|
}
|
|
|
|
func (c *Client) ExtDataRank(ctx context.Context, extdataname, stockcode string, deviation int) (any, error) {
|
|
return c.postField(ctx, "/api/ext/ext_data_rank", map[string]any{
|
|
"extdataname": extdataname, "stockcode": stockcode, "deviation": deviation,
|
|
}, "rank")
|
|
}
|
|
|
|
func (c *Client) GetFactorValue(ctx context.Context, factorname, stockcode string, deviation int) (any, error) {
|
|
return c.postField(ctx, "/api/ext/get_factor_value", map[string]any{
|
|
"factorname": factorname, "stockcode": stockcode, "deviation": deviation,
|
|
}, "value")
|
|
}
|
|
|
|
func (c *Client) GetFactorRank(ctx context.Context, factorname, stockcode string, deviation int) (any, error) {
|
|
return c.postField(ctx, "/api/ext/get_factor_rank", map[string]any{
|
|
"factorname": factorname, "stockcode": stockcode, "deviation": deviation,
|
|
}, "rank")
|
|
}
|