positions

package
v0.0.0-...-44eb7c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIPath string = "/v1/me/getpositions"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Position

type Position struct {
	ProductCode         types.ProductCode `json:"product_code"`
	Side                string            `json:"side"`
	Price               float64           `json:"price"`
	Size                float64           `json:"size"`
	Commission          float64           `json:"commission"`
	SwapPointAccumulate float64           `json:"swap_point_accumulate"`
	RequireCollateral   float64           `json:"require_collateral"`
	OpenDate            time.BitflyerTime `json:"open_date"`
	Leverage            float64           `json:"leverage"`
	Pnl                 float64           `json:"pnl"`
	Sfd                 float64           `json:"sfd"`
}

type Request

type Request struct {
	ProductCode types.ProductCode `json:"product_code" url:"product_code"`
}

func (*Request) Method

func (req *Request) Method() string

func (*Request) Payload

func (req *Request) Payload() []byte

func (*Request) Query

func (req *Request) Query() string

type Response

type Response []Position

type T

type T struct {
	Min   float64
	Size  float64
	Limit float64
}

T is Positions struct

func NewT

func NewT(min, limit float64) *T

NewT is new Positions struct

func (*T) Lot

func (p *T) Lot(side int, tension float64) (bool, float64)

Lot is Size for order lot p.Sizeに対応するsizeが返ってくる

func (*T) Set

func (p *T) Set(size float64)

Set is sets size

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL