// GetPrevious lets you go to the previous page if it exists, returns (*Trades, nil) if
// it is successfull and (nil, error) otherwise
GetPrevious lets you go to the previous page if it exists, returns (*Trades, nil) if
it is successfull and (nil, error) otherwise
// GetPrevious lets you go to the previous page if it exists returns ( * Trades nil ) if // it is successfull and ( nil error ) otherwise
func (t *Trades) GetPrevious() (*Trades, error) {
	if t.pagination.Previous == nil {
		return nil, fmt.Errorf("Previous page does not exist")
	}
	var newArgs []args.Argument = make([]args.Argument, 0, 5)
	newArgs = append(newArgs, args.Market(t.args["market"]))
	newArgs = append(newArgs, args.Page(int(t.pagination.Previous.(float64))))
	newArgs = append(newArgs, args.Limit(t.pagination.Limit))
	if v, ok := t.args["start"]; ok {
		newArgs = append(newArgs, args.Start(v))
	}
	if v, ok := t.args["end"]; ok {
		newArgs = append(newArgs, args.Start(v))
	}
	return t.client.GetTrades(newArgs...)
}
func ( t * Trades ) GetPrevious ( ) ( * Trades , error ) { if t . pagination . Previous == nil { return nil , fmt . Errorf ( " " ) } var newArgs [ ] args . Argument = make ( [ ] args . Argument , 0 , 5 ) newArgs = append ( newArgs , args . Market ( t . args [ " " ] ) ) newArgs = append ( newArgs , args . Page ( int ( t . pagination . Previous . ( float64 ) ) ) ) newArgs = append ( newArgs , args . Limit ( t . pagination . Limit ) ) if v , ok := t . args [ " " ] ; ok { newArgs = append ( newArgs , args . Start ( v ) ) } if v , ok := t . args [ " " ] ; ok { newArgs = append ( newArgs , args . Start ( v ) ) } return t . client . GetTrades ( newArgs ... ) }
GetPrevious lets you go to the previous page if it exists, returns (*Trades, nil) if
it is successfull and (nil, error) otherwise
GetPrevious lets you go to the previous page if it exists returns ( * Trades nil ) if it is successfull and ( nil error ) otherwise
// there is always a market and a pagination