code: func (api *API) GetTransactionsToApprove(depth uint64, reference ...Hash) (*TransactionsToApprove, error) {
  	cmd := &GetTransactionsToApproveCommand{Command: Command{GetTransactionsToApproveCmd}, Depth: depth}
  	if len(reference) > 0 {
  		if err := Validate(ValidateTransactionHashes(reference...)); err != nil {
  			return nil, ErrInvalidReferenceHash
  		}
  		cmd.Reference = reference[0]
  	}
  	rsp := &GetTransactionsToApproveResponse{}
  	if err := api.provider.Send(cmd, rsp); err != nil {
  		return nil, err
  	}
  	return &rsp.TransactionsToApprove, nil
  }
docs: // GetTransactionsToApprove does the tip selection via the connected node.
  //
  // Returns a pair of approved transactions which are chosen randomly after validating the transaction trytes,
  // the signatures and cross-checking for conflicting transactions.
  //
  // Tip selection is executed by a Random Walk (RW) starting at random point in the given depth,
  // ending up to the pair of selected tips. For more information about tip selection please refer to the
  // whitepaper (http://iotatoken.com/IOTA_Whitepaper.pdf).
  //
  // The reference option allows to select tips in a way that the reference transaction is being approved too.
  // This is useful for promoting transactions, for example with PromoteTransaction().