Subversion Repositories Integrator Subversion

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
795 blopes 1
package br.com.kronus.binance.futures;
2
 
3
import java.math.BigDecimal;
4
 
5
import br.com.kronus.binance.futures.tipos.TipoOrdem;
6
 
7
/**
8
 * Representa uma "ordem estratégica" com:
9
 * - Ordem de entrada
10
 * - Stop Loss
11
 * - Take Profit (alvo)
12
 *
13
 * Na prática, serão 3 ordens na Binance:
14
 *  1) Entrada (MARKET ou LIMIT)
15
 *  2) STOP_MARKET (stop loss)
16
 *  3) TAKE_PROFIT_MARKET (alvo)
17
 */
18
public class RequisicaoOrdemBracket {
19
 
20
    private String simbolo;
21
    private DirecaoOrdem direcao; // BUY (long) ou SELL (short)
22
    private BigDecimal quantidade; // tamanho da posição
23
 
24
    // Entrada
25
    private TipoOrdem tipoEntrada; // MARKET ou LIMIT
26
    private BigDecimal precoEntrada; // se LIMIT
27
 
28
    // Stop e alvo (preços do gatilho)
29
    private BigDecimal stopLoss;
30
    private BigDecimal takeProfit;
31
 
32
    // Working type: MARK_PRICE ou CONTRACT_PRICE (null = padrão da Binance)
33
    private String tipoAcionamento;
34
 
35
    public String getSimbolo() {
36
        return simbolo;
37
    }
38
 
39
    public RequisicaoOrdemBracket setSimbolo(String simbolo) {
40
        this.simbolo = simbolo;
41
        return this;
42
    }
43
 
44
    public DirecaoOrdem getDirecao() {
45
        return direcao;
46
    }
47
 
48
    public RequisicaoOrdemBracket setDirecao(DirecaoOrdem direcao) {
49
        this.direcao = direcao;
50
        return this;
51
    }
52
 
53
    public BigDecimal getQuantidade() {
54
        return quantidade;
55
    }
56
 
57
    public RequisicaoOrdemBracket setQuantidade(BigDecimal quantidade) {
58
        this.quantidade = quantidade;
59
        return this;
60
    }
61
 
62
    public TipoOrdem getTipoEntrada() {
63
        return tipoEntrada;
64
    }
65
 
66
    public RequisicaoOrdemBracket setTipoEntrada(TipoOrdem tipoEntrada) {
67
        this.tipoEntrada = tipoEntrada;
68
        return this;
69
    }
70
 
71
    public BigDecimal getPrecoEntrada() {
72
        return precoEntrada;
73
    }
74
 
75
    public RequisicaoOrdemBracket setPrecoEntrada(BigDecimal precoEntrada) {
76
        this.precoEntrada = precoEntrada;
77
        return this;
78
    }
79
 
80
    public BigDecimal getStopLoss() {
81
        return stopLoss;
82
    }
83
 
84
    public RequisicaoOrdemBracket setStopLoss(BigDecimal stopLoss) {
85
        this.stopLoss = stopLoss;
86
        return this;
87
    }
88
 
89
    public BigDecimal getTakeProfit() {
90
        return takeProfit;
91
    }
92
 
93
    public RequisicaoOrdemBracket setTakeProfit(BigDecimal takeProfit) {
94
        this.takeProfit = takeProfit;
95
        return this;
96
    }
97
 
98
    public String getTipoAcionamento() {
99
        return tipoAcionamento;
100
    }
101
 
102
    public RequisicaoOrdemBracket setTipoAcionamento(String tipoAcionamento) {
103
        this.tipoAcionamento = tipoAcionamento;
104
        return this;
105
    }
106
}