pub struct Rfq {
pub from_assets: Vec<String>,
pub to_assets: Vec<String>,
pub from_amount: Option<String>,
pub to_amount: Option<String>,
pub requester: Party,
pub provider: Option<Party>,
pub agents: Vec<Agent>,
pub policies: Option<Vec<Value>>,
pub transaction_id: Option<String>,
pub metadata: HashMap<String, Value>,
}Expand description
RFQ (Request for Quote) message body (TAIP-18).
Initiates a request for cross-asset quotes. Supports multiple source and target assets, enabling complex exchange scenarios like cross-currency swaps, on/off-ramp pricing, and cross-chain bridging.
Fields§
§from_assets: Vec<String>Available source assets (CAIP-19, DTI, or ISO 4217 currency codes).
to_assets: Vec<String>Desired target assets (CAIP-19, DTI, or ISO 4217 currency codes).
from_amount: Option<String>Amount of source asset to exchange (conditional: either this or to_amount required).
to_amount: Option<String>Amount of target asset desired (conditional: either this or from_amount required).
requester: PartyThe party requesting the exchange.
provider: Option<Party>The preferred liquidity provider (optional, omit to broadcast).
agents: Vec<Agent>Agents involved in the RFQ.
policies: Option<Vec<Value>>Compliance or presentation requirements (TAIP-7).
transaction_id: Option<String>Transaction identifier (only available after creation).
metadata: HashMap<String, Value>Additional metadata.
Implementations§
Source§impl Rfq
impl Rfq
Sourcepub fn new_from(
from_assets: Vec<String>,
to_assets: Vec<String>,
from_amount: String,
requester: Party,
agents: Vec<Agent>,
) -> Self
pub fn new_from( from_assets: Vec<String>, to_assets: Vec<String>, from_amount: String, requester: Party, agents: Vec<Agent>, ) -> Self
Create a new RFQ with from_amount specified.
Sourcepub fn new_to(
from_assets: Vec<String>,
to_assets: Vec<String>,
to_amount: String,
requester: Party,
agents: Vec<Agent>,
) -> Self
pub fn new_to( from_assets: Vec<String>, to_assets: Vec<String>, to_amount: String, requester: Party, agents: Vec<Agent>, ) -> Self
Create a new RFQ with to_amount specified.
Sourcepub fn with_provider(self, provider: Party) -> Self
pub fn with_provider(self, provider: Party) -> Self
Set the provider for this RFQ.
Sourcepub fn with_policies(self, policies: Vec<Value>) -> Self
pub fn with_policies(self, policies: Vec<Value>) -> Self
Set policies for this RFQ.