All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fluxtion.server.lib.pnl.dto.DtoHelper Maven / Gradle / Ivy

/*
 *
 *  * SPDX-FileCopyrightText: © 2024 Gregory Higgins 
 *  * SPDX-License-Identifier: AGPL-3.0-only
 *
 */

package com.fluxtion.server.lib.pnl.dto;

import com.fluxtion.server.lib.pnl.NetMarkToMarket;

import java.util.HashMap;
import java.util.Map;

public interface DtoHelper {

    static Map formatPosition(NetMarkToMarket netMarkToMarket) {
        HashMap positionMap = new HashMap<>();
        netMarkToMarket.instrumentMtm().getPositionMap().forEach((k, v) -> {
            positionMap.put(k.instrumentName(), v);
        });
        return positionMap;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy